From 579d6c0e8e8943c6ab0c2a64d8a3d7eb2be0c0e7 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Wed, 17 Jul 2024 11:45:01 +0530 Subject: [PATCH] deployed verifying paymaster on all testnets --- config/networks.ts | 5 + deploy/010_deploy_verifying_paymaster.ts | 13 +- deployments/amoy/VerifyingPaymaster.json | 52 +- .../59f95187e8259e6af2142e5284338606.json | 285 + .../ancient8Testnet/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../arbitrumSepolia/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../baseSepolia/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + deployments/bifrostTest/.pendingTransactions | 5 - .../bscTestnet/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + deployments/chiado/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + deployments/coston2/VerifyingPaymaster.json | 721 + .../59f95187e8259e6af2142e5284338606.json | 285 + deployments/fuji/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../fuseSparknet/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../klaytnTest/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../kromaSepolia/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + deployments/lineaTestnet/.pendingTransactions | 12270 ++++++++++++++++ .../mantleSepolia/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../optimismSepolia/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../rootstockTestnet/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../scrollSepolia/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + deployments/sepolia/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + deployments/xdcApothem/.chainId | 1 + .../xdcApothem/VerifyingPaymaster.json | 637 + .../59f95187e8259e6af2142e5284338606.json | 285 + .../src/modular-etherspot-wallet/index.ts | 1 + .../modular-etherspot-wallet/modules/index.ts | 1 + typings/hardhat.d.ts | 18 + typings/index.ts | 8 +- typings/src/modular-etherspot-wallet/index.ts | 2 + .../modular-etherspot-wallet/modules/index.ts | 1 + 45 files changed, 27462 insertions(+), 36 deletions(-) create mode 100644 deployments/amoy/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/ancient8Testnet/VerifyingPaymaster.json create mode 100644 deployments/ancient8Testnet/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/arbitrumSepolia/VerifyingPaymaster.json create mode 100644 deployments/arbitrumSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/baseSepolia/VerifyingPaymaster.json create mode 100644 deployments/baseSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json delete mode 100644 deployments/bifrostTest/.pendingTransactions create mode 100644 deployments/bscTestnet/VerifyingPaymaster.json create mode 100644 deployments/bscTestnet/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/chiado/VerifyingPaymaster.json create mode 100644 deployments/chiado/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/coston2/VerifyingPaymaster.json create mode 100644 deployments/coston2/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/fuji/VerifyingPaymaster.json create mode 100644 deployments/fuji/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/fuseSparknet/VerifyingPaymaster.json create mode 100644 deployments/fuseSparknet/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/klaytnTest/VerifyingPaymaster.json create mode 100644 deployments/klaytnTest/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/kromaSepolia/VerifyingPaymaster.json create mode 100644 deployments/kromaSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/lineaTestnet/.pendingTransactions create mode 100644 deployments/mantleSepolia/VerifyingPaymaster.json create mode 100644 deployments/mantleSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/optimismSepolia/VerifyingPaymaster.json create mode 100644 deployments/optimismSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/rootstockTestnet/VerifyingPaymaster.json create mode 100644 deployments/rootstockTestnet/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/scrollSepolia/VerifyingPaymaster.json create mode 100644 deployments/scrollSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/sepolia/VerifyingPaymaster.json create mode 100644 deployments/sepolia/solcInputs/59f95187e8259e6af2142e5284338606.json create mode 100644 deployments/xdcApothem/.chainId create mode 100644 deployments/xdcApothem/VerifyingPaymaster.json create mode 100644 deployments/xdcApothem/solcInputs/59f95187e8259e6af2142e5284338606.json diff --git a/config/networks.ts b/config/networks.ts index 3be3b9a2..e24f3adf 100644 --- a/config/networks.ts +++ b/config/networks.ts @@ -223,6 +223,11 @@ const networks: HardhatUserConfig['networks'] = { url: 'https://rpc-amoy.polygon.technology', accounts: [process.env.DEPLOYER_PRIVATE_KEY!], }, + xdcApothem: { + chainId: 51, + url: 'https://rpc.apothem.network', + accounts: [process.env.DEPLOYER_PRIVATE_KEY!], + }, dev: { url: 'http://localhost:8545' }, }; export default networks; diff --git a/deploy/010_deploy_verifying_paymaster.ts b/deploy/010_deploy_verifying_paymaster.ts index 0d1ee0c8..91b9d3cf 100644 --- a/deploy/010_deploy_verifying_paymaster.ts +++ b/deploy/010_deploy_verifying_paymaster.ts @@ -12,7 +12,7 @@ const deployVerifyingPaymaster: DeployFunction = async function ( console.log('starting deployment of verifying paymaster...'); const entrypoint = '0x0000000071727De22E5E9d8BAf0edAc6f37da032'; - const verifyingSigner = ''; + const verifyingSigner = '0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567'; const ret = await deploy('VerifyingPaymaster', { from, args: [entrypoint, verifyingSigner], @@ -37,6 +37,17 @@ const deployVerifyingPaymaster: DeployFunction = async function ( 'addStake', 1 ); + + await execute( + 'VerifyingPaymaster', + { + from, + value: await ethers.utils.parseEther('100'), + log: true, + gasLimit: 6e6, + }, + 'deposit' + ); console.log('Done!'); }; diff --git a/deployments/amoy/VerifyingPaymaster.json b/deployments/amoy/VerifyingPaymaster.json index 632678c0..7cde7d9d 100644 --- a/deployments/amoy/VerifyingPaymaster.json +++ b/deployments/amoy/VerifyingPaymaster.json @@ -1,5 +1,5 @@ { - "address": "0x810FA4C915015b703db0878CF2B9344bEB254a40", + "address": "0x9ddB9DC20E904206823184577e9C571c713d2c57", "abi": [ { "inputs": [ @@ -456,58 +456,58 @@ "type": "function" } ], - "transactionHash": "0x926675c1bf1b1b341072fed9e18cce114a355bd020c80c5ae2c882bb924bdb42", + "transactionHash": "0x78ad3f7a71d13d826dfd040ea0b6b07a88d3737777c2ca82b113c9b8d494980e", "receipt": { "to": null, "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", - "contractAddress": "0x810FA4C915015b703db0878CF2B9344bEB254a40", - "transactionIndex": 4, + "contractAddress": "0x9ddB9DC20E904206823184577e9C571c713d2c57", + "transactionIndex": 2, "gasUsed": "1081962", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000002000000000000000008000000000000000000000000000000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000040000000000000000004000000000004000008000000000000208000000000000000000000000000000000000000000000000200000000004000000000000000000001010000000000000000000000000000100000000020000000000000000000000000000800000000000000000000000000000000100000", - "blockHash": "0xcf6f423ae469e52e90e2c97ce630c42a6c8a334999a42fb6306ff863ef896d0c", - "transactionHash": "0x926675c1bf1b1b341072fed9e18cce114a355bd020c80c5ae2c882bb924bdb42", + "logsBloom": "0x00008000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800001000000000000000100000000001000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000004000000000004000000000000000000200008000000000000000000000000000020000000000000000200000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000800000000000000000000000000040000100000", + "blockHash": "0xb57359630c794a1a645ca85dd552decab0f5e01eec1f631cd504fab7a013cb3d", + "transactionHash": "0x78ad3f7a71d13d826dfd040ea0b6b07a88d3737777c2ca82b113c9b8d494980e", "logs": [ { - "transactionIndex": 4, - "blockNumber": 7273301, - "transactionHash": "0x926675c1bf1b1b341072fed9e18cce114a355bd020c80c5ae2c882bb924bdb42", - "address": "0x810FA4C915015b703db0878CF2B9344bEB254a40", + "transactionIndex": 2, + "blockNumber": 9325163, + "transactionHash": "0x78ad3f7a71d13d826dfd040ea0b6b07a88d3737777c2ca82b113c9b8d494980e", + "address": "0x9ddB9DC20E904206823184577e9C571c713d2c57", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" ], "data": "0x", - "logIndex": 17, - "blockHash": "0xcf6f423ae469e52e90e2c97ce630c42a6c8a334999a42fb6306ff863ef896d0c" + "logIndex": 3, + "blockHash": "0xb57359630c794a1a645ca85dd552decab0f5e01eec1f631cd504fab7a013cb3d" }, { - "transactionIndex": 4, - "blockNumber": 7273301, - "transactionHash": "0x926675c1bf1b1b341072fed9e18cce114a355bd020c80c5ae2c882bb924bdb42", + "transactionIndex": 2, + "blockNumber": 9325163, + "transactionHash": "0x78ad3f7a71d13d826dfd040ea0b6b07a88d3737777c2ca82b113c9b8d494980e", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59", - "0x000000000000000000000000bb583a9dde59ca64aaa14807f37a4c665c0d72c7" + "0x000000000000000000000000ac75d6efec891724b88b916b36e2ef38bcbec73f" ], - "data": "0x00000000000000000000000000000000000000000000000000043a714cbcce00000000000000000000000000000000000000000000000000023d16aca4b4fcd4000000000000000000000000000000000000000000000057e5779c2fe531811f0000000000000000000000000000000000000000000000000238dc3b57f82ed4000000000000000000000000000000000000000000000057e57bd6a131ee4f1f", - "logIndex": 18, - "blockHash": "0xcf6f423ae469e52e90e2c97ce630c42a6c8a334999a42fb6306ff863ef896d0c" + "data": "0x0000000000000000000000000000000000000000000000000379ddd8afea0b48000000000000000000000000000000000000000000000004ff159ae1f41ca45b00000000000000000000000000000000000000000000019ca052ca0ceab97ef8000000000000000000000000000000000000000000000004fb9bbd094432991300000000000000000000000000000000000000000000019ca3cca7e59aa38a40", + "logIndex": 4, + "blockHash": "0xb57359630c794a1a645ca85dd552decab0f5e01eec1f631cd504fab7a013cb3d" } ], - "blockNumber": 7273301, - "cumulativeGasUsed": "2706853", + "blockNumber": 9325163, + "cumulativeGasUsed": "1550445", "status": 1, "byzantium": true }, "args": [ "0x0000000071727De22E5E9d8BAf0edAc6f37da032", - "0x09FD4F6088f2025427AB1e89257A44747081Ed59" + "0x80a1874E1046B1cc5deFdf4D3153838B72fF94Ac" ], - "numDeployments": 2, - "solcInputHash": "76fc3400aac293b785a3bc1a7c6df34b", + "numDeployments": 3, + "solcInputHash": "59f95187e8259e6af2142e5284338606", "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", @@ -633,7 +633,7 @@ "type": "t_address" }, { - "astId": 55431, + "astId": 51905, "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", "label": "verifyingSigner", "offset": 0, diff --git a/deployments/amoy/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/amoy/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/amoy/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/ancient8Testnet/VerifyingPaymaster.json b/deployments/ancient8Testnet/VerifyingPaymaster.json new file mode 100644 index 00000000..dfc8ca27 --- /dev/null +++ b/deployments/ancient8Testnet/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0xc95A2Fb019445C9B3459c2C59e7cd6Ad2c8FBb1E", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x7b40ebf35b7df16abf7626a17e9309e1dc087bef4af363c5f1645222d1832249", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0xc95A2Fb019445C9B3459c2C59e7cd6Ad2c8FBb1E", + "transactionIndex": 1, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000010000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xba1e71df1759c0cd0e2b52e7ab6bdd4b2cc75670e968c6d0e8f334ad0b623dd4", + "transactionHash": "0x7b40ebf35b7df16abf7626a17e9309e1dc087bef4af363c5f1645222d1832249", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 8680937, + "transactionHash": "0x7b40ebf35b7df16abf7626a17e9309e1dc087bef4af363c5f1645222d1832249", + "address": "0xc95A2Fb019445C9B3459c2C59e7cd6Ad2c8FBb1E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xba1e71df1759c0cd0e2b52e7ab6bdd4b2cc75670e968c6d0e8f334ad0b623dd4" + } + ], + "blockNumber": 8680937, + "cumulativeGasUsed": "1125777", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/ancient8Testnet/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/ancient8Testnet/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/ancient8Testnet/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/arbitrumSepolia/VerifyingPaymaster.json b/deployments/arbitrumSepolia/VerifyingPaymaster.json new file mode 100644 index 00000000..b973aef0 --- /dev/null +++ b/deployments/arbitrumSepolia/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x5FD81CfCAa69F44B6d105795961b3E484ac9e7dB", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x7bda9b20b02d701485f4c2dd0728c8f0586e001d0db8cc0fe556b43532e6cafa", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x5FD81CfCAa69F44B6d105795961b3E484ac9e7dB", + "transactionIndex": 1, + "gasUsed": "16013768", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000004000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000400000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x565938b000f28e1d91c6a44b0314e1959172162407caf9f11d4c176e03cfa519", + "transactionHash": "0x7bda9b20b02d701485f4c2dd0728c8f0586e001d0db8cc0fe556b43532e6cafa", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 64214600, + "transactionHash": "0x7bda9b20b02d701485f4c2dd0728c8f0586e001d0db8cc0fe556b43532e6cafa", + "address": "0x5FD81CfCAa69F44B6d105795961b3E484ac9e7dB", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x565938b000f28e1d91c6a44b0314e1959172162407caf9f11d4c176e03cfa519" + } + ], + "blockNumber": 64214600, + "cumulativeGasUsed": "16013768", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/arbitrumSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/arbitrumSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/arbitrumSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/baseSepolia/VerifyingPaymaster.json b/deployments/baseSepolia/VerifyingPaymaster.json new file mode 100644 index 00000000..3f6ed5ec --- /dev/null +++ b/deployments/baseSepolia/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x96487e37c8400552cc52389ff59c8a46e61a14430b9915a7236f69e2f5efe71c", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "transactionIndex": 7, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000100000000000000000000000000000001000000000", + "blockHash": "0xea8a306bf4fdfcdbf6f44d79260cf2b078bbd2da50c880413bf27f6953123bbb", + "transactionHash": "0x96487e37c8400552cc52389ff59c8a46e61a14430b9915a7236f69e2f5efe71c", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 12674832, + "transactionHash": "0x96487e37c8400552cc52389ff59c8a46e61a14430b9915a7236f69e2f5efe71c", + "address": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 14, + "blockHash": "0xea8a306bf4fdfcdbf6f44d79260cf2b078bbd2da50c880413bf27f6953123bbb" + } + ], + "blockNumber": 12674832, + "cumulativeGasUsed": "5972171", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/baseSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/baseSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/baseSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/bifrostTest/.pendingTransactions b/deployments/bifrostTest/.pendingTransactions deleted file mode 100644 index 853acff9..00000000 --- a/deployments/bifrostTest/.pendingTransactions +++ /dev/null @@ -1,5 +0,0 @@ -{ - "0x47f35ef52b8f136916e6d835da6875d6d57082c634c9072463667aeaeb9e9afd": { - "rawTx": "0x02f89682bfc01d80860101d77ccb388367c280944602818693b3d0d9d8d5caea4e7803031ee8dbd3872386f26fc10000a40396cb600000000000000000000000000000000000000000000000000000000000000001c080a08582c1fc5d193f359b925afc25643ec20d1e7b9f6aa7cded744adeac86299bc3a0609fbcb1b32e90f89f246ccbd20469276cc1d374cec8ff58083a055761e21f4a" - } -} \ No newline at end of file diff --git a/deployments/bscTestnet/VerifyingPaymaster.json b/deployments/bscTestnet/VerifyingPaymaster.json new file mode 100644 index 00000000..9ec176b0 --- /dev/null +++ b/deployments/bscTestnet/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x7e83140b8bb116f90399c1334889508f6a69a3940b547d6c5bb2ae40fa1da04c", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "transactionIndex": 4, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000100000000000000000000000000000001000000000", + "blockHash": "0x4f4816315835d6b642256c17a7766fbc8c20bd8be0edf67aa6c9f9aaeef41cad", + "transactionHash": "0x7e83140b8bb116f90399c1334889508f6a69a3940b547d6c5bb2ae40fa1da04c", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 42132430, + "transactionHash": "0x7e83140b8bb116f90399c1334889508f6a69a3940b547d6c5bb2ae40fa1da04c", + "address": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x4f4816315835d6b642256c17a7766fbc8c20bd8be0edf67aa6c9f9aaeef41cad" + } + ], + "blockNumber": 42132430, + "cumulativeGasUsed": "1235651", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/bscTestnet/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/bscTestnet/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/bscTestnet/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/chiado/VerifyingPaymaster.json b/deployments/chiado/VerifyingPaymaster.json new file mode 100644 index 00000000..89504c46 --- /dev/null +++ b/deployments/chiado/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x35AfDd0219a5D72f674D728D5544Bc0f838eEFFa", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xea3278f053ca1dbf243542ca46b5227ca3c762dc63ac177a8868f3906474ee01", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x35AfDd0219a5D72f674D728D5544Bc0f838eEFFa", + "transactionIndex": 0, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000200000000800000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000040000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x872bee7c607d35d2ac8e8487fc07db6981b551cdf45b843cdc3307639880c48d", + "transactionHash": "0xea3278f053ca1dbf243542ca46b5227ca3c762dc63ac177a8868f3906474ee01", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 10843516, + "transactionHash": "0xea3278f053ca1dbf243542ca46b5227ca3c762dc63ac177a8868f3906474ee01", + "address": "0x35AfDd0219a5D72f674D728D5544Bc0f838eEFFa", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x872bee7c607d35d2ac8e8487fc07db6981b551cdf45b843cdc3307639880c48d" + } + ], + "blockNumber": 10843516, + "cumulativeGasUsed": "1081962", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/chiado/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/chiado/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/chiado/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/coston2/VerifyingPaymaster.json b/deployments/coston2/VerifyingPaymaster.json new file mode 100644 index 00000000..d49ec1ce --- /dev/null +++ b/deployments/coston2/VerifyingPaymaster.json @@ -0,0 +1,721 @@ +{ + "address": "0x5952653F151e844346825050d7157A9a6b46A23A", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x5952653F151e844346825050d7157A9a6b46A23A", + "transactionIndex": 0, + "gasUsed": "1081636", + "logsBloom": "0x00020000000000000000000000000000008000000000000000800000000000000000000000000000000000000000000000000000080008000000000000000000000000000000000000400000000000000001000000000000000080000000000000000000020000000000000000000800000000000000000001000000000000400000000000000000000000000000000004000000000004000000000400000000080000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f", + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 9930139, + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "address": "0x5952653F151e844346825050d7157A9a6b46A23A", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f" + }, + { + "transactionIndex": 0, + "blockNumber": 9930139, + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "address": "0x1000000000000000000000000000000000000002", + "topics": [ + "0xe7aa66356adbd5e839ef210626f6d8f6f72109c17fadf4c4f9ca82b315ae79b4" + ], + "data": "0x00000000000000000000000098b8e9b5830f04fe3b8d56a2f8455e337037ba280000000000000000000000000000000000000000000000000000000000004231", + "logIndex": 1, + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f" + }, + { + "transactionIndex": 0, + "blockNumber": 9930139, + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "address": "0x1000000000000000000000000000000000000002", + "topics": [ + "0xe7aa66356adbd5e839ef210626f6d8f6f72109c17fadf4c4f9ca82b315ae79b4" + ], + "data": "0x0000000000000000000000004f52e61907b0ed9f26b88f16b2510a4ca524d6d00000000000000000000000000000000000000000000000000000000000003099", + "logIndex": 2, + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f" + }, + { + "transactionIndex": 0, + "blockNumber": 9930139, + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "address": "0x1000000000000000000000000000000000000002", + "topics": [ + "0xe7aa66356adbd5e839ef210626f6d8f6f72109c17fadf4c4f9ca82b315ae79b4" + ], + "data": "0x000000000000000000000000d2a1bb23eb350814a30dd6f9de78bb2c8fdd9f1d0000000000000000000000000000000000000000000000000000000000003b68", + "logIndex": 3, + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f" + }, + { + "transactionIndex": 0, + "blockNumber": 9930139, + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "address": "0x1000000000000000000000000000000000000002", + "topics": [ + "0xe7aa66356adbd5e839ef210626f6d8f6f72109c17fadf4c4f9ca82b315ae79b4" + ], + "data": "0x0000000000000000000000006892bdbbb14e1c9bd46bf31e7bac94d038fc82a6000000000000000000000000000000000000000000000000000000000000422d", + "logIndex": 4, + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f" + }, + { + "transactionIndex": 0, + "blockNumber": 9930139, + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "address": "0x1000000000000000000000000000000000000002", + "topics": [ + "0xe7aa66356adbd5e839ef210626f6d8f6f72109c17fadf4c4f9ca82b315ae79b4" + ], + "data": "0x000000000000000000000000bd33bdff04c357f7fc019e72d0504c24cf4aa0100000000000000000000000000000000000000000000000000000000000008f11", + "logIndex": 5, + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f" + }, + { + "transactionIndex": 0, + "blockNumber": 9930139, + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "address": "0x1000000000000000000000000000000000000002", + "topics": [ + "0xe7aa66356adbd5e839ef210626f6d8f6f72109c17fadf4c4f9ca82b315ae79b4" + ], + "data": "0x000000000000000000000000bc1f76ceb521eb5484b8943b5462d08ea96617a10000000000000000000000000000000000000000000000000000000000004eb2", + "logIndex": 6, + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f" + }, + { + "transactionIndex": 0, + "blockNumber": 9930139, + "transactionHash": "0x6dfd04d01de8cff97cf0140d51c4c538dbf103b725230dd8fa3737817386d45e", + "address": "0x1000000000000000000000000000000000000002", + "topics": [ + "0xe7aa66356adbd5e839ef210626f6d8f6f72109c17fadf4c4f9ca82b315ae79b4" + ], + "data": "0x00000000000000000000000058fb598ec6db6901aa6f26a9a2087e9274128e5900000000000000000000000000000000000000000000000000000000000103ba", + "logIndex": 7, + "blockHash": "0x031db82f0e21f622f5ff14bc0439106f894d3e84e12688798ba129ca71e2732f" + } + ], + "blockNumber": 9930139, + "cumulativeGasUsed": "1081636", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/coston2/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/coston2/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/coston2/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/fuji/VerifyingPaymaster.json b/deployments/fuji/VerifyingPaymaster.json new file mode 100644 index 00000000..91b0cb56 --- /dev/null +++ b/deployments/fuji/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x676d7FD668d8255F15d22Ae2AA0a9E9a44375952", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xd1a32ed81eabdfeb6d517d0a2e7519a826f28b38af67164fb6a01f7f18edbfec", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x676d7FD668d8255F15d22Ae2AA0a9E9a44375952", + "transactionIndex": 0, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000020000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000004000000000000000000000000000000", + "blockHash": "0x93b1720d3ba737be51f58a371c828f2d7e04b5d544430d8bb4a98dd1501cf74d", + "transactionHash": "0xd1a32ed81eabdfeb6d517d0a2e7519a826f28b38af67164fb6a01f7f18edbfec", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 34864960, + "transactionHash": "0xd1a32ed81eabdfeb6d517d0a2e7519a826f28b38af67164fb6a01f7f18edbfec", + "address": "0x676d7FD668d8255F15d22Ae2AA0a9E9a44375952", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x93b1720d3ba737be51f58a371c828f2d7e04b5d544430d8bb4a98dd1501cf74d" + } + ], + "blockNumber": 34864960, + "cumulativeGasUsed": "1081962", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuji/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/fuji/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/fuji/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/VerifyingPaymaster.json b/deployments/fuseSparknet/VerifyingPaymaster.json new file mode 100644 index 00000000..c819cbff --- /dev/null +++ b/deployments/fuseSparknet/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0xf6E4486156cc2F982eceC15a90B23047F396EcBE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe5ba845bcec7d4a253601a389d24f5f48840c69cc0947605751131a107976a17", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0xf6E4486156cc2F982eceC15a90B23047F396EcBE", + "transactionIndex": 0, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000002000002000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000100000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb965588866bb71d06ee461285b22d3b21ade0fe940018d06fe310cb1acbc3cb7", + "transactionHash": "0xe5ba845bcec7d4a253601a389d24f5f48840c69cc0947605751131a107976a17", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 17088696, + "transactionHash": "0xe5ba845bcec7d4a253601a389d24f5f48840c69cc0947605751131a107976a17", + "address": "0xf6E4486156cc2F982eceC15a90B23047F396EcBE", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xb965588866bb71d06ee461285b22d3b21ade0fe940018d06fe310cb1acbc3cb7" + } + ], + "blockNumber": 17088696, + "cumulativeGasUsed": "1081962", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/fuseSparknet/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/fuseSparknet/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/klaytnTest/VerifyingPaymaster.json b/deployments/klaytnTest/VerifyingPaymaster.json new file mode 100644 index 00000000..ffbb4f1f --- /dev/null +++ b/deployments/klaytnTest/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x35AfDd0219a5D72f674D728D5544Bc0f838eEFFa", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x31812eca3963e09ebe8a5d5252fdf560fa4b1a283b8daa69c61ca2b6a240c287", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x35AfDd0219a5D72f674D728D5544Bc0f838eEFFa", + "transactionIndex": 0, + "gasUsed": "1525014", + "logsBloom": "0x00000000000000000000000000000000000000000200000000800000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000040000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xde16fdc5283d5fac87ee4bde32e7f29bd97f05205a9b67e523f1cfe36afe6071", + "transactionHash": "0x31812eca3963e09ebe8a5d5252fdf560fa4b1a283b8daa69c61ca2b6a240c287", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 159533894, + "transactionHash": "0x31812eca3963e09ebe8a5d5252fdf560fa4b1a283b8daa69c61ca2b6a240c287", + "address": "0x35AfDd0219a5D72f674D728D5544Bc0f838eEFFa", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xde16fdc5283d5fac87ee4bde32e7f29bd97f05205a9b67e523f1cfe36afe6071" + } + ], + "blockNumber": 159533894, + "cumulativeGasUsed": "1525014", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/klaytnTest/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/klaytnTest/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/klaytnTest/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/kromaSepolia/VerifyingPaymaster.json b/deployments/kromaSepolia/VerifyingPaymaster.json new file mode 100644 index 00000000..318a0a14 --- /dev/null +++ b/deployments/kromaSepolia/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x515D2A390C24dB531e209701d907FC0Ee1C7c224", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xca3c4ff21e26f3b95ecffae9d59ab716f8ac93ee20a8ca663067de47d552f9f6", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x515D2A390C24dB531e209701d907FC0Ee1C7c224", + "transactionIndex": 1, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000008000400000400000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000002000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb671c449afa7a707f6e2b2a8bd234e6a060d2d2b6e57dfabc29bec9a94c8cafb", + "transactionHash": "0xca3c4ff21e26f3b95ecffae9d59ab716f8ac93ee20a8ca663067de47d552f9f6", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 16202913, + "transactionHash": "0xca3c4ff21e26f3b95ecffae9d59ab716f8ac93ee20a8ca663067de47d552f9f6", + "address": "0x515D2A390C24dB531e209701d907FC0Ee1C7c224", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xb671c449afa7a707f6e2b2a8bd234e6a060d2d2b6e57dfabc29bec9a94c8cafb" + } + ], + "blockNumber": 16202913, + "cumulativeGasUsed": "1139322", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/kromaSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/kromaSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/kromaSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/lineaTestnet/.pendingTransactions b/deployments/lineaTestnet/.pendingTransactions new file mode 100644 index 00000000..5c2a2e8c --- /dev/null +++ b/deployments/lineaTestnet/.pendingTransactions @@ -0,0 +1,12270 @@ +{ + "0x836491a90cf243a9b253fcf52ab406ff079092ed369ba1998934346fb418a9a7": { + "name": "VerifyingPaymaster", + "deployment": { + "_format": "hh-sol-artifact-1", + "contractName": "VerifyingPaymaster", + "sourceName": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "version": 1 + }, + "evm": { + "bytecode": { + "functionDebugData": { + "@_2912": { + "entryPoint": null, + "id": 2912, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@_50": { + "entryPoint": null, + "id": 50, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@_51933": { + "entryPoint": null, + "id": 51933, + "parameterSlots": 2, + "returnSlots": 0 + }, + "@_transferOwnership_146": { + "entryPoint": 161, + "id": 146, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@_validateEntryPointInterface_2935": { + "entryPoint": 241, + "id": 2935, + "parameterSlots": 1, + "returnSlots": 0 + }, + "abi_decode_tuple_t_bool_fromMemory": { + "entryPoint": 521, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_contract$_IEntryPoint_$7000t_address_fromMemory": { + "entryPoint": 458, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_encode_tuple_t_address__to_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_7960c93a5f91001fe3b3e9a56f8716da93c29bf7a3aa7adb703901f21a308af8__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "validator_revert_contract_IEntryPoint": { + "entryPoint": 436, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nativeSrc": "0:1652:84", + "nodeType": "YulBlock", + "src": "0:1652:84", + "statements": [ + { + "nativeSrc": "6:3:84", + "nodeType": "YulBlock", + "src": "6:3:84", + "statements": [] + }, + { + "body": { + "nativeSrc": "72:86:84", + "nodeType": "YulBlock", + "src": "72:86:84", + "statements": [ + { + "body": { + "nativeSrc": "136:16:84", + "nodeType": "YulBlock", + "src": "136:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "145:1:84", + "nodeType": "YulLiteral", + "src": "145:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "148:1:84", + "nodeType": "YulLiteral", + "src": "148:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "138:6:84", + "nodeType": "YulIdentifier", + "src": "138:6:84" + }, + "nativeSrc": "138:12:84", + "nodeType": "YulFunctionCall", + "src": "138:12:84" + }, + "nativeSrc": "138:12:84", + "nodeType": "YulExpressionStatement", + "src": "138:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "95:5:84", + "nodeType": "YulIdentifier", + "src": "95:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "106:5:84", + "nodeType": "YulIdentifier", + "src": "106:5:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "121:3:84", + "nodeType": "YulLiteral", + "src": "121:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "126:1:84", + "nodeType": "YulLiteral", + "src": "126:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "117:3:84", + "nodeType": "YulIdentifier", + "src": "117:3:84" + }, + "nativeSrc": "117:11:84", + "nodeType": "YulFunctionCall", + "src": "117:11:84" + }, + { + "kind": "number", + "nativeSrc": "130:1:84", + "nodeType": "YulLiteral", + "src": "130:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "113:3:84", + "nodeType": "YulIdentifier", + "src": "113:3:84" + }, + "nativeSrc": "113:19:84", + "nodeType": "YulFunctionCall", + "src": "113:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "102:3:84", + "nodeType": "YulIdentifier", + "src": "102:3:84" + }, + "nativeSrc": "102:31:84", + "nodeType": "YulFunctionCall", + "src": "102:31:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "92:2:84", + "nodeType": "YulIdentifier", + "src": "92:2:84" + }, + "nativeSrc": "92:42:84", + "nodeType": "YulFunctionCall", + "src": "92:42:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "85:6:84", + "nodeType": "YulIdentifier", + "src": "85:6:84" + }, + "nativeSrc": "85:50:84", + "nodeType": "YulFunctionCall", + "src": "85:50:84" + }, + "nativeSrc": "82:70:84", + "nodeType": "YulIf", + "src": "82:70:84" + } + ] + }, + "name": "validator_revert_contract_IEntryPoint", + "nativeSrc": "14:144:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "61:5:84", + "nodeType": "YulTypedName", + "src": "61:5:84", + "type": "" + } + ], + "src": "14:144:84" + }, + { + "body": { + "nativeSrc": "281:313:84", + "nodeType": "YulBlock", + "src": "281:313:84", + "statements": [ + { + "body": { + "nativeSrc": "327:16:84", + "nodeType": "YulBlock", + "src": "327:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "336:1:84", + "nodeType": "YulLiteral", + "src": "336:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "339:1:84", + "nodeType": "YulLiteral", + "src": "339:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "329:6:84", + "nodeType": "YulIdentifier", + "src": "329:6:84" + }, + "nativeSrc": "329:12:84", + "nodeType": "YulFunctionCall", + "src": "329:12:84" + }, + "nativeSrc": "329:12:84", + "nodeType": "YulExpressionStatement", + "src": "329:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "302:7:84", + "nodeType": "YulIdentifier", + "src": "302:7:84" + }, + { + "name": "headStart", + "nativeSrc": "311:9:84", + "nodeType": "YulIdentifier", + "src": "311:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "298:3:84", + "nodeType": "YulIdentifier", + "src": "298:3:84" + }, + "nativeSrc": "298:23:84", + "nodeType": "YulFunctionCall", + "src": "298:23:84" + }, + { + "kind": "number", + "nativeSrc": "323:2:84", + "nodeType": "YulLiteral", + "src": "323:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "294:3:84", + "nodeType": "YulIdentifier", + "src": "294:3:84" + }, + "nativeSrc": "294:32:84", + "nodeType": "YulFunctionCall", + "src": "294:32:84" + }, + "nativeSrc": "291:52:84", + "nodeType": "YulIf", + "src": "291:52:84" + }, + { + "nativeSrc": "352:29:84", + "nodeType": "YulVariableDeclaration", + "src": "352:29:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "371:9:84", + "nodeType": "YulIdentifier", + "src": "371:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "365:5:84", + "nodeType": "YulIdentifier", + "src": "365:5:84" + }, + "nativeSrc": "365:16:84", + "nodeType": "YulFunctionCall", + "src": "365:16:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "356:5:84", + "nodeType": "YulTypedName", + "src": "356:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "428:5:84", + "nodeType": "YulIdentifier", + "src": "428:5:84" + } + ], + "functionName": { + "name": "validator_revert_contract_IEntryPoint", + "nativeSrc": "390:37:84", + "nodeType": "YulIdentifier", + "src": "390:37:84" + }, + "nativeSrc": "390:44:84", + "nodeType": "YulFunctionCall", + "src": "390:44:84" + }, + "nativeSrc": "390:44:84", + "nodeType": "YulExpressionStatement", + "src": "390:44:84" + }, + { + "nativeSrc": "443:15:84", + "nodeType": "YulAssignment", + "src": "443:15:84", + "value": { + "name": "value", + "nativeSrc": "453:5:84", + "nodeType": "YulIdentifier", + "src": "453:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "443:6:84", + "nodeType": "YulIdentifier", + "src": "443:6:84" + } + ] + }, + { + "nativeSrc": "467:40:84", + "nodeType": "YulVariableDeclaration", + "src": "467:40:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "492:9:84", + "nodeType": "YulIdentifier", + "src": "492:9:84" + }, + { + "kind": "number", + "nativeSrc": "503:2:84", + "nodeType": "YulLiteral", + "src": "503:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "488:3:84", + "nodeType": "YulIdentifier", + "src": "488:3:84" + }, + "nativeSrc": "488:18:84", + "nodeType": "YulFunctionCall", + "src": "488:18:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "482:5:84", + "nodeType": "YulIdentifier", + "src": "482:5:84" + }, + "nativeSrc": "482:25:84", + "nodeType": "YulFunctionCall", + "src": "482:25:84" + }, + "variables": [ + { + "name": "value_1", + "nativeSrc": "471:7:84", + "nodeType": "YulTypedName", + "src": "471:7:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value_1", + "nativeSrc": "554:7:84", + "nodeType": "YulIdentifier", + "src": "554:7:84" + } + ], + "functionName": { + "name": "validator_revert_contract_IEntryPoint", + "nativeSrc": "516:37:84", + "nodeType": "YulIdentifier", + "src": "516:37:84" + }, + "nativeSrc": "516:46:84", + "nodeType": "YulFunctionCall", + "src": "516:46:84" + }, + "nativeSrc": "516:46:84", + "nodeType": "YulExpressionStatement", + "src": "516:46:84" + }, + { + "nativeSrc": "571:17:84", + "nodeType": "YulAssignment", + "src": "571:17:84", + "value": { + "name": "value_1", + "nativeSrc": "581:7:84", + "nodeType": "YulIdentifier", + "src": "581:7:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "571:6:84", + "nodeType": "YulIdentifier", + "src": "571:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_contract$_IEntryPoint_$7000t_address_fromMemory", + "nativeSrc": "163:431:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "239:9:84", + "nodeType": "YulTypedName", + "src": "239:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "250:7:84", + "nodeType": "YulTypedName", + "src": "250:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "262:6:84", + "nodeType": "YulTypedName", + "src": "262:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "270:6:84", + "nodeType": "YulTypedName", + "src": "270:6:84", + "type": "" + } + ], + "src": "163:431:84" + }, + { + "body": { + "nativeSrc": "700:102:84", + "nodeType": "YulBlock", + "src": "700:102:84", + "statements": [ + { + "nativeSrc": "710:26:84", + "nodeType": "YulAssignment", + "src": "710:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "722:9:84", + "nodeType": "YulIdentifier", + "src": "722:9:84" + }, + { + "kind": "number", + "nativeSrc": "733:2:84", + "nodeType": "YulLiteral", + "src": "733:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "718:3:84", + "nodeType": "YulIdentifier", + "src": "718:3:84" + }, + "nativeSrc": "718:18:84", + "nodeType": "YulFunctionCall", + "src": "718:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "710:4:84", + "nodeType": "YulIdentifier", + "src": "710:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "752:9:84", + "nodeType": "YulIdentifier", + "src": "752:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "767:6:84", + "nodeType": "YulIdentifier", + "src": "767:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "783:3:84", + "nodeType": "YulLiteral", + "src": "783:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "788:1:84", + "nodeType": "YulLiteral", + "src": "788:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "779:3:84", + "nodeType": "YulIdentifier", + "src": "779:3:84" + }, + "nativeSrc": "779:11:84", + "nodeType": "YulFunctionCall", + "src": "779:11:84" + }, + { + "kind": "number", + "nativeSrc": "792:1:84", + "nodeType": "YulLiteral", + "src": "792:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "775:3:84", + "nodeType": "YulIdentifier", + "src": "775:3:84" + }, + "nativeSrc": "775:19:84", + "nodeType": "YulFunctionCall", + "src": "775:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "763:3:84", + "nodeType": "YulIdentifier", + "src": "763:3:84" + }, + "nativeSrc": "763:32:84", + "nodeType": "YulFunctionCall", + "src": "763:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "745:6:84", + "nodeType": "YulIdentifier", + "src": "745:6:84" + }, + "nativeSrc": "745:51:84", + "nodeType": "YulFunctionCall", + "src": "745:51:84" + }, + "nativeSrc": "745:51:84", + "nodeType": "YulExpressionStatement", + "src": "745:51:84" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "599:203:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "669:9:84", + "nodeType": "YulTypedName", + "src": "669:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "680:6:84", + "nodeType": "YulTypedName", + "src": "680:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "691:4:84", + "nodeType": "YulTypedName", + "src": "691:4:84", + "type": "" + } + ], + "src": "599:203:84" + }, + { + "body": { + "nativeSrc": "906:103:84", + "nodeType": "YulBlock", + "src": "906:103:84", + "statements": [ + { + "nativeSrc": "916:26:84", + "nodeType": "YulAssignment", + "src": "916:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "928:9:84", + "nodeType": "YulIdentifier", + "src": "928:9:84" + }, + { + "kind": "number", + "nativeSrc": "939:2:84", + "nodeType": "YulLiteral", + "src": "939:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "924:3:84", + "nodeType": "YulIdentifier", + "src": "924:3:84" + }, + "nativeSrc": "924:18:84", + "nodeType": "YulFunctionCall", + "src": "924:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "916:4:84", + "nodeType": "YulIdentifier", + "src": "916:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "958:9:84", + "nodeType": "YulIdentifier", + "src": "958:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "973:6:84", + "nodeType": "YulIdentifier", + "src": "973:6:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "985:3:84", + "nodeType": "YulLiteral", + "src": "985:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "990:10:84", + "nodeType": "YulLiteral", + "src": "990:10:84", + "type": "", + "value": "0xffffffff" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "981:3:84", + "nodeType": "YulIdentifier", + "src": "981:3:84" + }, + "nativeSrc": "981:20:84", + "nodeType": "YulFunctionCall", + "src": "981:20:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "969:3:84", + "nodeType": "YulIdentifier", + "src": "969:3:84" + }, + "nativeSrc": "969:33:84", + "nodeType": "YulFunctionCall", + "src": "969:33:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "951:6:84", + "nodeType": "YulIdentifier", + "src": "951:6:84" + }, + "nativeSrc": "951:52:84", + "nodeType": "YulFunctionCall", + "src": "951:52:84" + }, + "nativeSrc": "951:52:84", + "nodeType": "YulExpressionStatement", + "src": "951:52:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack_reversed", + "nativeSrc": "807:202:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "875:9:84", + "nodeType": "YulTypedName", + "src": "875:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "886:6:84", + "nodeType": "YulTypedName", + "src": "886:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "897:4:84", + "nodeType": "YulTypedName", + "src": "897:4:84", + "type": "" + } + ], + "src": "807:202:84" + }, + { + "body": { + "nativeSrc": "1092:199:84", + "nodeType": "YulBlock", + "src": "1092:199:84", + "statements": [ + { + "body": { + "nativeSrc": "1138:16:84", + "nodeType": "YulBlock", + "src": "1138:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1147:1:84", + "nodeType": "YulLiteral", + "src": "1147:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1150:1:84", + "nodeType": "YulLiteral", + "src": "1150:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1140:6:84", + "nodeType": "YulIdentifier", + "src": "1140:6:84" + }, + "nativeSrc": "1140:12:84", + "nodeType": "YulFunctionCall", + "src": "1140:12:84" + }, + "nativeSrc": "1140:12:84", + "nodeType": "YulExpressionStatement", + "src": "1140:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1113:7:84", + "nodeType": "YulIdentifier", + "src": "1113:7:84" + }, + { + "name": "headStart", + "nativeSrc": "1122:9:84", + "nodeType": "YulIdentifier", + "src": "1122:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1109:3:84", + "nodeType": "YulIdentifier", + "src": "1109:3:84" + }, + "nativeSrc": "1109:23:84", + "nodeType": "YulFunctionCall", + "src": "1109:23:84" + }, + { + "kind": "number", + "nativeSrc": "1134:2:84", + "nodeType": "YulLiteral", + "src": "1134:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1105:3:84", + "nodeType": "YulIdentifier", + "src": "1105:3:84" + }, + "nativeSrc": "1105:32:84", + "nodeType": "YulFunctionCall", + "src": "1105:32:84" + }, + "nativeSrc": "1102:52:84", + "nodeType": "YulIf", + "src": "1102:52:84" + }, + { + "nativeSrc": "1163:29:84", + "nodeType": "YulVariableDeclaration", + "src": "1163:29:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1182:9:84", + "nodeType": "YulIdentifier", + "src": "1182:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1176:5:84", + "nodeType": "YulIdentifier", + "src": "1176:5:84" + }, + "nativeSrc": "1176:16:84", + "nodeType": "YulFunctionCall", + "src": "1176:16:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "1167:5:84", + "nodeType": "YulTypedName", + "src": "1167:5:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1245:16:84", + "nodeType": "YulBlock", + "src": "1245:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1254:1:84", + "nodeType": "YulLiteral", + "src": "1254:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1257:1:84", + "nodeType": "YulLiteral", + "src": "1257:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1247:6:84", + "nodeType": "YulIdentifier", + "src": "1247:6:84" + }, + "nativeSrc": "1247:12:84", + "nodeType": "YulFunctionCall", + "src": "1247:12:84" + }, + "nativeSrc": "1247:12:84", + "nodeType": "YulExpressionStatement", + "src": "1247:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1214:5:84", + "nodeType": "YulIdentifier", + "src": "1214:5:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1235:5:84", + "nodeType": "YulIdentifier", + "src": "1235:5:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1228:6:84", + "nodeType": "YulIdentifier", + "src": "1228:6:84" + }, + "nativeSrc": "1228:13:84", + "nodeType": "YulFunctionCall", + "src": "1228:13:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1221:6:84", + "nodeType": "YulIdentifier", + "src": "1221:6:84" + }, + "nativeSrc": "1221:21:84", + "nodeType": "YulFunctionCall", + "src": "1221:21:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "1211:2:84", + "nodeType": "YulIdentifier", + "src": "1211:2:84" + }, + "nativeSrc": "1211:32:84", + "nodeType": "YulFunctionCall", + "src": "1211:32:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1204:6:84", + "nodeType": "YulIdentifier", + "src": "1204:6:84" + }, + "nativeSrc": "1204:40:84", + "nodeType": "YulFunctionCall", + "src": "1204:40:84" + }, + "nativeSrc": "1201:60:84", + "nodeType": "YulIf", + "src": "1201:60:84" + }, + { + "nativeSrc": "1270:15:84", + "nodeType": "YulAssignment", + "src": "1270:15:84", + "value": { + "name": "value", + "nativeSrc": "1280:5:84", + "nodeType": "YulIdentifier", + "src": "1280:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1270:6:84", + "nodeType": "YulIdentifier", + "src": "1270:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bool_fromMemory", + "nativeSrc": "1014:277:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1058:9:84", + "nodeType": "YulTypedName", + "src": "1058:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1069:7:84", + "nodeType": "YulTypedName", + "src": "1069:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1081:6:84", + "nodeType": "YulTypedName", + "src": "1081:6:84", + "type": "" + } + ], + "src": "1014:277:84" + }, + { + "body": { + "nativeSrc": "1470:180:84", + "nodeType": "YulBlock", + "src": "1470:180:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1487:9:84", + "nodeType": "YulIdentifier", + "src": "1487:9:84" + }, + { + "kind": "number", + "nativeSrc": "1498:2:84", + "nodeType": "YulLiteral", + "src": "1498:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1480:6:84", + "nodeType": "YulIdentifier", + "src": "1480:6:84" + }, + "nativeSrc": "1480:21:84", + "nodeType": "YulFunctionCall", + "src": "1480:21:84" + }, + "nativeSrc": "1480:21:84", + "nodeType": "YulExpressionStatement", + "src": "1480:21:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1521:9:84", + "nodeType": "YulIdentifier", + "src": "1521:9:84" + }, + { + "kind": "number", + "nativeSrc": "1532:2:84", + "nodeType": "YulLiteral", + "src": "1532:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1517:3:84", + "nodeType": "YulIdentifier", + "src": "1517:3:84" + }, + "nativeSrc": "1517:18:84", + "nodeType": "YulFunctionCall", + "src": "1517:18:84" + }, + { + "kind": "number", + "nativeSrc": "1537:2:84", + "nodeType": "YulLiteral", + "src": "1537:2:84", + "type": "", + "value": "30" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1510:6:84", + "nodeType": "YulIdentifier", + "src": "1510:6:84" + }, + "nativeSrc": "1510:30:84", + "nodeType": "YulFunctionCall", + "src": "1510:30:84" + }, + "nativeSrc": "1510:30:84", + "nodeType": "YulExpressionStatement", + "src": "1510:30:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1560:9:84", + "nodeType": "YulIdentifier", + "src": "1560:9:84" + }, + { + "kind": "number", + "nativeSrc": "1571:2:84", + "nodeType": "YulLiteral", + "src": "1571:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1556:3:84", + "nodeType": "YulIdentifier", + "src": "1556:3:84" + }, + "nativeSrc": "1556:18:84", + "nodeType": "YulFunctionCall", + "src": "1556:18:84" + }, + { + "hexValue": "49456e747279506f696e7420696e74657266616365206d69736d61746368", + "kind": "string", + "nativeSrc": "1576:32:84", + "nodeType": "YulLiteral", + "src": "1576:32:84", + "type": "", + "value": "IEntryPoint interface mismatch" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1549:6:84", + "nodeType": "YulIdentifier", + "src": "1549:6:84" + }, + "nativeSrc": "1549:60:84", + "nodeType": "YulFunctionCall", + "src": "1549:60:84" + }, + "nativeSrc": "1549:60:84", + "nodeType": "YulExpressionStatement", + "src": "1549:60:84" + }, + { + "nativeSrc": "1618:26:84", + "nodeType": "YulAssignment", + "src": "1618:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1630:9:84", + "nodeType": "YulIdentifier", + "src": "1630:9:84" + }, + { + "kind": "number", + "nativeSrc": "1641:2:84", + "nodeType": "YulLiteral", + "src": "1641:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1626:3:84", + "nodeType": "YulIdentifier", + "src": "1626:3:84" + }, + "nativeSrc": "1626:18:84", + "nodeType": "YulFunctionCall", + "src": "1626:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "1618:4:84", + "nodeType": "YulIdentifier", + "src": "1618:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_7960c93a5f91001fe3b3e9a56f8716da93c29bf7a3aa7adb703901f21a308af8__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "1296:354:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1447:9:84", + "nodeType": "YulTypedName", + "src": "1447:9:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "1461:4:84", + "nodeType": "YulTypedName", + "src": "1461:4:84", + "type": "" + } + ], + "src": "1296:354:84" + } + ] + }, + "contents": "{\n { }\n function validator_revert_contract_IEntryPoint(value)\n {\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_contract$_IEntryPoint_$7000t_address_fromMemory(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let value := mload(headStart)\n validator_revert_contract_IEntryPoint(value)\n value0 := value\n let value_1 := mload(add(headStart, 32))\n validator_revert_contract_IEntryPoint(value_1)\n value1 := value_1\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, shl(224, 0xffffffff)))\n }\n function abi_decode_tuple_t_bool_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, iszero(iszero(value)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_7960c93a5f91001fe3b3e9a56f8716da93c29bf7a3aa7adb703901f21a308af8__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 30)\n mstore(add(headStart, 64), \"IEntryPoint interface mismatch\")\n tail := add(headStart, 96)\n }\n}", + "id": 84, + "language": "Yul", + "name": "#utility.yul" + } + ], + "linkReferences": {}, + "object": "60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x1417 CODESIZE SUB DUP1 PUSH3 0x1417 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x34 SWAP2 PUSH3 0x1CA JUMP JUMPDEST DUP2 CALLER DUP1 PUSH3 0x5D JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH3 0x68 DUP2 PUSH3 0xA1 JUMP JUMPDEST POP PUSH3 0x74 DUP2 PUSH3 0xF1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND PUSH1 0x80 MSTORE PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP3 SWAP1 SWAP2 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE POP PUSH3 0x234 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x1FFC9A7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH4 0x122A0E9B PUSH1 0xE3 SHL PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND SWAP1 PUSH4 0x1FFC9A7 SWAP1 PUSH1 0x24 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH3 0x13D JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x163 SWAP2 SWAP1 PUSH3 0x209 JUMP JUMPDEST PUSH3 0x1B1 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1E PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x49456E747279506F696E7420696E74657266616365206D69736D617463680000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH3 0x54 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x1B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH3 0x1DE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH3 0x1EB DUP2 PUSH3 0x1B4 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH3 0x1FE DUP2 PUSH3 0x1B4 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0x21C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 MLOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH3 0x22D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH2 0x1196 PUSH3 0x281 PUSH1 0x0 CODECOPY PUSH1 0x0 DUP2 DUP2 PUSH2 0x27B ADD MSTORE DUP2 DUP2 PUSH2 0x331 ADD MSTORE DUP2 DUP2 PUSH2 0x3C8 ADD MSTORE DUP2 DUP2 PUSH2 0x61E ADD MSTORE DUP2 DUP2 PUSH2 0x6B8 ADD MSTORE DUP2 DUP2 PUSH2 0x728 ADD MSTORE DUP2 DUP2 PUSH2 0x7B5 ADD MSTORE PUSH2 0x87D ADD MSTORE PUSH2 0x1196 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xF3 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x93B94121 GT PUSH2 0x8A JUMPI DUP1 PUSH4 0xC23A5CEA GT PUSH2 0x59 JUMPI DUP1 PUSH4 0xC23A5CEA EQ PUSH2 0x2B2 JUMPI DUP1 PUSH4 0xC399EC88 EQ PUSH2 0x2D2 JUMPI DUP1 PUSH4 0xD0E30DB0 EQ PUSH2 0x2E7 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x2EF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x93B94121 EQ PUSH2 0x219 JUMPI DUP1 PUSH4 0x94D4AD60 EQ PUSH2 0x239 JUMPI DUP1 PUSH4 0xB0D691FE EQ PUSH2 0x269 JUMPI DUP1 PUSH4 0xBB9FE6BF EQ PUSH2 0x29D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x5829C5F5 GT PUSH2 0xC6 JUMPI DUP1 PUSH4 0x5829C5F5 EQ PUSH2 0x198 JUMPI DUP1 PUSH4 0x715018A6 EQ PUSH2 0x1C6 JUMPI DUP1 PUSH4 0x7C627B21 EQ PUSH2 0x1DB JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x1FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x396CB60 EQ PUSH2 0xF8 JUMPI DUP1 PUSH4 0x205C2878 EQ PUSH2 0x10D JUMPI DUP1 PUSH4 0x23D9AC9B EQ PUSH2 0x12D JUMPI DUP1 PUSH4 0x52B7512C EQ PUSH2 0x16A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10B PUSH2 0x106 CALLDATASIZE PUSH1 0x4 PUSH2 0xD3C JUMP JUMPDEST PUSH2 0x30F JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x119 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x128 CALLDATASIZE PUSH1 0x4 PUSH2 0xD7E JUMP JUMPDEST PUSH2 0x39A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x139 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 SLOAD PUSH2 0x14D SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x176 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x18A PUSH2 0x185 CALLDATASIZE PUSH1 0x4 PUSH2 0xDC3 JUMP JUMPDEST PUSH2 0x40C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x161 SWAP3 SWAP2 SWAP1 PUSH2 0xE11 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B8 PUSH2 0x1B3 CALLDATASIZE PUSH1 0x4 PUSH2 0xE81 JUMP JUMPDEST PUSH2 0x430 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x161 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1D2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x540 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1E7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xF28 JUMP JUMPDEST PUSH2 0x554 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x207 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x14D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x225 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x234 CALLDATASIZE PUSH1 0x4 PUSH2 0xF93 JUMP JUMPDEST PUSH2 0x570 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x245 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x259 PUSH2 0x254 CALLDATASIZE PUSH1 0x4 PUSH2 0xFB0 JUMP JUMPDEST PUSH2 0x5CC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x161 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xFF2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x275 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x14D PUSH32 0x0 DUP2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2A9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x614 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x2CD CALLDATASIZE PUSH1 0x4 PUSH2 0xF93 JUMP JUMPDEST PUSH2 0x691 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2DE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B8 PUSH2 0x710 JUMP JUMPDEST PUSH2 0x10B PUSH2 0x7A0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x30A CALLDATASIZE PUSH1 0x4 PUSH2 0xF93 JUMP JUMPDEST PUSH2 0x802 JUMP JUMPDEST PUSH2 0x317 PUSH2 0x845 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x1CB65B PUSH1 0xE5 SHL DUP2 MSTORE PUSH4 0xFFFFFFFF DUP3 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x396CB60 SWAP1 CALLVALUE SWAP1 PUSH1 0x24 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x37E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x392 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x3A2 PUSH2 0x845 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x40B850F PUSH1 0xE3 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE PUSH1 0x24 DUP3 ADD DUP4 SWAP1 MSTORE PUSH32 0x0 AND SWAP1 PUSH4 0x205C2878 SWAP1 PUSH1 0x44 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x37E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x418 PUSH2 0x872 JUMP JUMPDEST PUSH2 0x423 DUP6 DUP6 DUP6 PUSH2 0x8E2 JUMP JUMPDEST SWAP2 POP SWAP2 POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 CALLDATALOAD DUP1 PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH2 0x447 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x103E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x455 SWAP3 SWAP2 SWAP1 PUSH2 0x1085 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 SWAP1 SUB SWAP1 KECCAK256 PUSH2 0x46B PUSH1 0x60 DUP10 ADD DUP10 PUSH2 0x103E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x479 SWAP3 SWAP2 SWAP1 PUSH2 0x1085 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 SWAP1 SUB SWAP1 KECCAK256 PUSH1 0x80 DUP10 ADD CALLDATALOAD PUSH2 0x494 PUSH1 0xE0 DUP12 ADD DUP12 PUSH2 0x103E JUMP JUMPDEST PUSH2 0x4A3 SWAP2 PUSH1 0x34 SWAP2 PUSH1 0x14 SWAP2 PUSH2 0x1095 JUMP JUMPDEST PUSH2 0x4AC SWAP2 PUSH2 0x10BF JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP8 AND PUSH1 0x20 DUP9 ADD MSTORE DUP7 ADD SWAP5 SWAP1 SWAP5 MSTORE PUSH1 0x60 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x80 DUP5 ADD MSTORE PUSH1 0xA0 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xC0 DUP1 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP8 ADD CALLDATALOAD PUSH1 0xE0 DUP4 ADD MSTORE DUP7 ADD CALLDATALOAD PUSH2 0x100 DUP3 ADD MSTORE CHAINID PUSH2 0x120 DUP3 ADD MSTORE ADDRESS PUSH2 0x140 DUP3 ADD MSTORE PUSH6 0xFFFFFFFFFFFF DUP1 DUP7 AND PUSH2 0x160 DUP4 ADD MSTORE DUP5 AND PUSH2 0x180 DUP3 ADD MSTORE PUSH2 0x1A0 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x548 PUSH2 0x845 JUMP JUMPDEST PUSH2 0x552 PUSH1 0x0 PUSH2 0xA77 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0x55C PUSH2 0x872 JUMP JUMPDEST PUSH2 0x569 DUP6 DUP6 DUP6 DUP6 DUP6 PUSH2 0xAC7 JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH2 0x578 PUSH2 0x845 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH32 0x51D754AC8F7ADF515A023F2C423E01EF97817C1AF33CB63B36F1FE12FDE2D91A SWAP1 PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 CALLDATASIZE DUP2 PUSH2 0x5DE DUP6 PUSH1 0x34 DUP2 DUP10 PUSH2 0x1095 JUMP JUMPDEST DUP2 ADD SWAP1 PUSH2 0x5EB SWAP2 SWAP1 PUSH2 0x10DD JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP DUP6 DUP6 PUSH2 0x5FE PUSH1 0x34 PUSH1 0x40 PUSH2 0x1110 JUMP JUMPDEST PUSH2 0x609 SWAP3 DUP3 SWAP1 PUSH2 0x1095 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP5 POP POP POP JUMP JUMPDEST PUSH2 0x61C PUSH2 0x845 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xBB9FE6BF PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x677 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x68B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0x699 PUSH2 0x845 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x611D2E75 PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE PUSH32 0x0 AND SWAP1 PUSH4 0xC23A5CEA SWAP1 PUSH1 0x24 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x6FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x569 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x70A08231 PUSH1 0xE0 SHL DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x0 SWAP1 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x70A08231 SWAP1 PUSH1 0x24 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x777 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x79B SWAP2 SWAP1 PUSH2 0x1131 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xB760FAF9 PUSH1 0xE0 SHL DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0xB760FAF9 SWAP1 CALLVALUE SWAP1 PUSH1 0x24 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x6FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x80A PUSH2 0x845 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x839 JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x842 DUP2 PUSH2 0xA77 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x552 JUMPI PUSH1 0x40 MLOAD PUSH4 0x118CDAA7 PUSH1 0xE0 SHL DUP2 MSTORE CALLER PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x830 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND EQ PUSH2 0x552 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x15 PUSH1 0x24 DUP3 ADD MSTORE PUSH21 0x14D95B99195C881B9BDD08115B9D1C9E541BDA5B9D PUSH1 0x5A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x830 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 DUP1 CALLDATASIZE DUP2 PUSH2 0x8FA PUSH2 0x254 PUSH1 0xE0 DUP12 ADD DUP12 PUSH2 0x103E JUMP JUMPDEST SWAP3 SWAP7 POP SWAP1 SWAP5 POP SWAP3 POP SWAP1 POP PUSH1 0x40 DUP2 EQ DUP1 PUSH2 0x913 JUMPI POP PUSH1 0x41 DUP2 EQ JUMPDEST PUSH2 0x987 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH32 0x566572696679696E675061796D61737465723A20696E76616C6964207369676E PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x6174757265206C656E67746820696E207061796D6173746572416E6444617461 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x830 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x9CA PUSH2 0x997 DUP12 DUP8 DUP8 PUSH2 0x430 JUMP JUMPDEST PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1C SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x3C SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST SWAP1 POP PUSH2 0xA0C DUP2 DUP5 DUP5 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP PUSH2 0xAFF SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND SWAP2 AND EQ PUSH2 0xA4C JUMPI PUSH2 0xA2D PUSH1 0x1 DUP7 DUP7 PUSH2 0xB2B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 SWAP7 POP SWAP7 POP POP POP POP POP POP PUSH2 0x428 JUMP JUMPDEST PUSH2 0xA58 PUSH1 0x0 DUP7 DUP7 PUSH2 0xB2B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP2 MSTORE SWAP12 SWAP1 SWAP11 POP SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x6D757374206F76657272696465 PUSH1 0x98 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x830 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0xB0F DUP7 DUP7 PUSH2 0xB63 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xB1F DUP3 DUP3 PUSH2 0xBB0 JUMP JUMPDEST POP SWAP1 SWAP2 POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xD0 DUP3 PUSH6 0xFFFFFFFFFFFF AND SWAP1 SHL PUSH1 0xA0 DUP5 PUSH6 0xFFFFFFFFFFFF AND SWAP1 SHL DUP6 PUSH2 0xB53 JUMPI PUSH1 0x0 PUSH2 0xB56 JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH1 0xFF AND OR OR SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 MLOAD PUSH1 0x41 SUB PUSH2 0xB9D JUMPI PUSH1 0x20 DUP5 ADD MLOAD PUSH1 0x40 DUP6 ADD MLOAD PUSH1 0x60 DUP7 ADD MLOAD PUSH1 0x0 BYTE PUSH2 0xB8F DUP9 DUP3 DUP6 DUP6 PUSH2 0xC6D JUMP JUMPDEST SWAP6 POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0xBA9 JUMP JUMPDEST POP POP DUP2 MLOAD PUSH1 0x0 SWAP2 POP PUSH1 0x2 SWAP1 JUMPDEST SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xBC4 JUMPI PUSH2 0xBC4 PUSH2 0x114A JUMP JUMPDEST SUB PUSH2 0xBCD JUMPI POP POP JUMP JUMPDEST PUSH1 0x1 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xBE1 JUMPI PUSH2 0xBE1 PUSH2 0x114A JUMP JUMPDEST SUB PUSH2 0xBFF JUMPI PUSH1 0x40 MLOAD PUSH4 0xF645EEDF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xC13 JUMPI PUSH2 0xC13 PUSH2 0x114A JUMP JUMPDEST SUB PUSH2 0xC34 JUMPI PUSH1 0x40 MLOAD PUSH4 0xFCE698F7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x830 JUMP JUMPDEST PUSH1 0x3 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xC48 JUMPI PUSH2 0xC48 PUSH2 0x114A JUMP JUMPDEST SUB PUSH2 0xC69 JUMPI PUSH1 0x40 MLOAD PUSH4 0x35E2F383 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x830 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP5 GT ISZERO PUSH2 0xCA8 JUMPI POP PUSH1 0x0 SWAP2 POP PUSH1 0x3 SWAP1 POP DUP3 PUSH2 0xD32 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP11 SWAP1 MSTORE PUSH1 0xFF DUP10 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xCFC JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0xD28 JUMPI POP PUSH1 0x0 SWAP3 POP PUSH1 0x1 SWAP2 POP DUP3 SWAP1 POP PUSH2 0xD32 JUMP JUMPDEST SWAP3 POP PUSH1 0x0 SWAP2 POP DUP2 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 POP SWAP5 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xD62 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x842 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xD91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0xD9C DUP2 PUSH2 0xD69 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x120 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDBD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xDD8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xDEF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xDFB DUP7 DUP3 DUP8 ADD PUSH2 0xDAA JUMP JUMPDEST SWAP7 PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP7 POP PUSH1 0x40 SWAP1 SWAP6 ADD CALLDATALOAD SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP2 MSTORE PUSH1 0x0 DUP4 MLOAD DUP1 PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xE3F JUMPI PUSH1 0x20 DUP2 DUP8 ADD DUP2 ADD MLOAD PUSH1 0x60 DUP7 DUP5 ADD ADD MSTORE ADD PUSH2 0xE22 JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 DUP3 DUP6 ADD ADD MSTORE PUSH1 0x60 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP5 ADD ADD SWAP2 POP POP DUP3 PUSH1 0x20 DUP4 ADD MSTORE SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH6 0xFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xE7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xE96 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xEAD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xEB9 DUP7 DUP3 DUP8 ADD PUSH2 0xDAA JUMP JUMPDEST SWAP4 POP POP PUSH2 0xEC8 PUSH1 0x20 DUP6 ADD PUSH2 0xE66 JUMP JUMPDEST SWAP2 POP PUSH2 0xED6 PUSH1 0x40 DUP6 ADD PUSH2 0xE66 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0xEF1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF09 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xF21 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x80 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xF40 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH1 0x3 DUP2 LT PUSH2 0xF4F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF6B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xF77 DUP9 DUP3 DUP10 ADD PUSH2 0xEDF JUMP JUMPDEST SWAP7 SWAP10 SWAP1 SWAP9 POP SWAP6 SWAP7 PUSH1 0x40 DUP2 ADD CALLDATALOAD SWAP7 PUSH1 0x60 SWAP1 SWAP2 ADD CALLDATALOAD SWAP6 POP SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xFA5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xD62 DUP2 PUSH2 0xD69 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x20 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xFC3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xFDA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xFE6 DUP6 DUP3 DUP7 ADD PUSH2 0xEDF JUMP JUMPDEST SWAP1 SWAP7 SWAP1 SWAP6 POP SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH6 0xFFFFFFFFFFFF DUP1 DUP8 AND DUP4 MSTORE DUP1 DUP7 AND PUSH1 0x20 DUP5 ADD MSTORE POP PUSH1 0x60 PUSH1 0x40 DUP4 ADD MSTORE DUP3 PUSH1 0x60 DUP4 ADD MSTORE DUP3 DUP5 PUSH1 0x80 DUP5 ADD CALLDATACOPY PUSH1 0x0 PUSH1 0x80 DUP5 DUP5 ADD ADD MSTORE PUSH1 0x80 PUSH1 0x1F NOT PUSH1 0x1F DUP6 ADD AND DUP4 ADD ADD SWAP1 POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1055 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1070 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xF21 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 DUP4 DUP3 CALLDATACOPY PUSH1 0x0 SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP6 DUP6 GT ISZERO PUSH2 0x10A5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 DUP7 GT ISZERO PUSH2 0x10B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP DUP3 ADD SWAP4 SWAP2 SWAP1 SWAP3 SUB SWAP2 POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x20 DUP4 LT ISZERO PUSH2 0xB25 JUMPI PUSH1 0x0 NOT PUSH1 0x20 DUP5 SWAP1 SUB PUSH1 0x3 SHL SHL AND SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x10F0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10F9 DUP4 PUSH2 0xE66 JUMP JUMPDEST SWAP2 POP PUSH2 0x1107 PUSH1 0x20 DUP5 ADD PUSH2 0xE66 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP1 DUP3 ADD DUP1 DUP3 GT ISZERO PUSH2 0xB25 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1143 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xB3 0xDE 0xE5 PUSH14 0x54C33E3D801B74EF60DFDBF85DC7 SLOAD DUP12 DUP6 0x2F 0xDA PUSH2 0x6BD SLOAD 0x22 EXTCODEHASH 0xBD 0xAF 0x2E PUSH5 0x736F6C6343 STOP ADDMOD OR STOP CALLER ", + "sourceMap": "1127:4362:54:-:0;;;1487:163;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1586:11;950:10:14;;1269:95:0;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;745:51:84;718:18;;1322:31:0;;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;972:41:14::1;1001:11:::0;972:28:::1;:41::i;:::-;-1:-1:-1::0;;;;;1023:24:14;;::::1;;::::0;1609:15:54::1;:34:::0;;-1:-1:-1;;;;;;1609:34:54::1;::::0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;1127:4362:54;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;1173:218:14:-;1271:78;;-1:-1:-1;;;1271:78:14;;-1:-1:-1;;;1271:78:14;;;951:52:84;-1:-1:-1;;;;;1271:47:14;;;;;924:18:84;;1271:78:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1263:121;;;;-1:-1:-1;;;1263:121:14;;1498:2:84;1263:121:14;;;1480:21:84;1537:2;1517:18;;;1510:30;1576:32;1556:18;;;1549:60;1626:18;;1263:121:14;1296:354:84;1263:121:14;1173:218;:::o;14:144:84:-;-1:-1:-1;;;;;102:31:84;;92:42;;82:70;;148:1;145;138:12;163:431;262:6;270;323:2;311:9;302:7;298:23;294:32;291:52;;;339:1;336;329:12;291:52;371:9;365:16;390:44;428:5;390:44;:::i;:::-;503:2;488:18;;482:25;453:5;;-1:-1:-1;516:46:84;482:25;516:46;:::i;:::-;581:7;571:17;;;163:431;;;;;:::o;1014:277::-;1081:6;1134:2;1122:9;1113:7;1109:23;1105:32;1102:52;;;1150:1;1147;1140:12;1102:52;1182:9;1176:16;1235:5;1228:13;1221:21;1214:5;1211:32;1201:60;;1257:1;1254;1247:12;1201:60;1280:5;1014:277;-1:-1:-1;;;1014:277:84:o;1296:354::-;1127:4362:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": { + "@_checkOwner_84": { + "entryPoint": 2117, + "id": 84, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_msgSender_915": { + "entryPoint": null, + "id": 915, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_packValidationData_5821": { + "entryPoint": 2859, + "id": 5821, + "parameterSlots": 3, + "returnSlots": 1 + }, + "@_postOp_3025": { + "entryPoint": 2759, + "id": 3025, + "parameterSlots": 5, + "returnSlots": 0 + }, + "@_requireFromEntryPoint_3136": { + "entryPoint": 2162, + "id": 3136, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_throwError_1596": { + "entryPoint": 2992, + "id": 1596, + "parameterSlots": 2, + "returnSlots": 0 + }, + "@_transferOwnership_146": { + "entryPoint": 2679, + "id": 146, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@_validatePaymasterUserOp_52075": { + "entryPoint": 2274, + "id": 52075, + "parameterSlots": 3, + "returnSlots": 2 + }, + "@addStake_3078": { + "entryPoint": 783, + "id": 3078, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@deposit_3042": { + "entryPoint": 1952, + "id": 3042, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@entryPoint_2881": { + "entryPoint": null, + "id": 2881, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@getDeposit_3093": { + "entryPoint": 1808, + "id": 3093, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@getHash_51995": { + "entryPoint": 1072, + "id": 51995, + "parameterSlots": 3, + "returnSlots": 1 + }, + "@getSender_6433": { + "entryPoint": null, + "id": 6433, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@owner_67": { + "entryPoint": null, + "id": 67, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@parsePaymasterAndData_52109": { + "entryPoint": 1484, + "id": 52109, + "parameterSlots": 2, + "returnSlots": 4 + }, + "@postOp_3001": { + "entryPoint": 1364, + "id": 3001, + "parameterSlots": 5, + "returnSlots": 0 + }, + "@recover_1353": { + "entryPoint": 2815, + "id": 1353, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@renounceOwnership_98": { + "entryPoint": 1344, + "id": 98, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@toEthSignedMessageHash_1612": { + "entryPoint": null, + "id": 1612, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@transferOwnership_126": { + "entryPoint": 2050, + "id": 126, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@tryRecover_1323": { + "entryPoint": 2915, + "id": 1323, + "parameterSlots": 2, + "returnSlots": 3 + }, + "@tryRecover_1511": { + "entryPoint": 3181, + "id": 1511, + "parameterSlots": 4, + "returnSlots": 3 + }, + "@unlockStake_3105": { + "entryPoint": 1556, + "id": 3105, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@updateVerifyingSigner_52125": { + "entryPoint": 1392, + "id": 52125, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@validatePaymasterUserOp_2961": { + "entryPoint": 1036, + "id": 2961, + "parameterSlots": 3, + "returnSlots": 2 + }, + "@verifyingSigner_51905": { + "entryPoint": null, + "id": 51905, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@withdrawStake_3120": { + "entryPoint": 1681, + "id": 3120, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@withdrawTo_3060": { + "entryPoint": 922, + "id": 3060, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_decode_bytes_calldata": { + "entryPoint": 3807, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_decode_struct_PackedUserOperation_calldata": { + "entryPoint": 3498, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_address": { + "entryPoint": 3987, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_address_payable": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_address_payablet_uint256": { + "entryPoint": 3454, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_decode_tuple_t_bytes_calldata_ptr": { + "entryPoint": 4016, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_decode_tuple_t_enum$_PostOpMode_$7088t_bytes_calldata_ptrt_uint256t_uint256": { + "entryPoint": 3880, + "id": null, + "parameterSlots": 2, + "returnSlots": 5 + }, + "abi_decode_tuple_t_struct$_PackedUserOperation_$7243_calldata_ptrt_bytes32t_uint256": { + "entryPoint": 3523, + "id": null, + "parameterSlots": 2, + "returnSlots": 3 + }, + "abi_decode_tuple_t_struct$_PackedUserOperation_$7243_calldata_ptrt_uint48t_uint48": { + "entryPoint": 3713, + "id": null, + "parameterSlots": 2, + "returnSlots": 3 + }, + "abi_decode_tuple_t_uint256_fromMemory": { + "entryPoint": 4401, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint32": { + "entryPoint": 3388, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint48t_uint48": { + "entryPoint": 4317, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_decode_uint48": { + "entryPoint": 3686, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_packed_t_bytes_calldata_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed": { + "entryPoint": 4229, + "id": null, + "parameterSlots": 3, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address__to_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address_payable_t_uint256__to_t_address_payable_t_uint256__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 3, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address_t_uint256_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_uint256_t_bytes32_t_uint256_t_address_t_uint48_t_uint48__to_t_address_t_uint256_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_uint256_t_bytes32_t_uint256_t_address_t_uint48_t_uint48__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 13, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 5, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes_memory_ptr_t_uint256__to_t_bytes_memory_ptr_t_uint256__fromStack_reversed": { + "entryPoint": 3601, + "id": null, + "parameterSlots": 3, + "returnSlots": 1 + }, + "abi_encode_tuple_t_contract$_IEntryPoint_$7000__to_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_4f1183fece38266d89bbd94d1c93e02d713970166951c4c8f2c10a21e7cddae9__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_c0ccd72718b49b9af08aac30156bc47d10e177349cbe5dac0a36b471195929a7__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_cfebc7a599a78eb43bf12fd80d02a05464d681b0cdda54c5b6b39e95676c7f1d__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint32__to_t_uint32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint48_t_uint48_t_bytes_calldata_ptr__to_t_uint48_t_uint48_t_bytes_memory_ptr__fromStack_reversed": { + "entryPoint": 4082, + "id": null, + "parameterSlots": 5, + "returnSlots": 1 + }, + "access_calldata_tail_t_bytes_calldata_ptr": { + "entryPoint": 4158, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "calldata_array_index_range_access_t_bytes_calldata_ptr": { + "entryPoint": 4245, + "id": null, + "parameterSlots": 4, + "returnSlots": 2 + }, + "checked_add_t_uint256": { + "entryPoint": 4368, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "convert_bytes_to_fixedbytes_from_t_bytes_calldata_ptr_to_t_bytes32": { + "entryPoint": 4287, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "panic_error_0x21": { + "entryPoint": 4426, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "validator_revert_address_payable": { + "entryPoint": 3433, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nativeSrc": "0:11693:84", + "nodeType": "YulBlock", + "src": "0:11693:84", + "statements": [ + { + "nativeSrc": "6:3:84", + "nodeType": "YulBlock", + "src": "6:3:84", + "statements": [] + }, + { + "body": { + "nativeSrc": "83:207:84", + "nodeType": "YulBlock", + "src": "83:207:84", + "statements": [ + { + "body": { + "nativeSrc": "129:16:84", + "nodeType": "YulBlock", + "src": "129:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "138:1:84", + "nodeType": "YulLiteral", + "src": "138:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "141:1:84", + "nodeType": "YulLiteral", + "src": "141:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "131:6:84", + "nodeType": "YulIdentifier", + "src": "131:6:84" + }, + "nativeSrc": "131:12:84", + "nodeType": "YulFunctionCall", + "src": "131:12:84" + }, + "nativeSrc": "131:12:84", + "nodeType": "YulExpressionStatement", + "src": "131:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "104:7:84", + "nodeType": "YulIdentifier", + "src": "104:7:84" + }, + { + "name": "headStart", + "nativeSrc": "113:9:84", + "nodeType": "YulIdentifier", + "src": "113:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "100:3:84", + "nodeType": "YulIdentifier", + "src": "100:3:84" + }, + "nativeSrc": "100:23:84", + "nodeType": "YulFunctionCall", + "src": "100:23:84" + }, + { + "kind": "number", + "nativeSrc": "125:2:84", + "nodeType": "YulLiteral", + "src": "125:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "96:3:84", + "nodeType": "YulIdentifier", + "src": "96:3:84" + }, + "nativeSrc": "96:32:84", + "nodeType": "YulFunctionCall", + "src": "96:32:84" + }, + "nativeSrc": "93:52:84", + "nodeType": "YulIf", + "src": "93:52:84" + }, + { + "nativeSrc": "154:36:84", + "nodeType": "YulVariableDeclaration", + "src": "154:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "180:9:84", + "nodeType": "YulIdentifier", + "src": "180:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "167:12:84", + "nodeType": "YulIdentifier", + "src": "167:12:84" + }, + "nativeSrc": "167:23:84", + "nodeType": "YulFunctionCall", + "src": "167:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "158:5:84", + "nodeType": "YulTypedName", + "src": "158:5:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "244:16:84", + "nodeType": "YulBlock", + "src": "244:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "253:1:84", + "nodeType": "YulLiteral", + "src": "253:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "256:1:84", + "nodeType": "YulLiteral", + "src": "256:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "246:6:84", + "nodeType": "YulIdentifier", + "src": "246:6:84" + }, + "nativeSrc": "246:12:84", + "nodeType": "YulFunctionCall", + "src": "246:12:84" + }, + "nativeSrc": "246:12:84", + "nodeType": "YulExpressionStatement", + "src": "246:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "212:5:84", + "nodeType": "YulIdentifier", + "src": "212:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "223:5:84", + "nodeType": "YulIdentifier", + "src": "223:5:84" + }, + { + "kind": "number", + "nativeSrc": "230:10:84", + "nodeType": "YulLiteral", + "src": "230:10:84", + "type": "", + "value": "0xffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "219:3:84", + "nodeType": "YulIdentifier", + "src": "219:3:84" + }, + "nativeSrc": "219:22:84", + "nodeType": "YulFunctionCall", + "src": "219:22:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "209:2:84", + "nodeType": "YulIdentifier", + "src": "209:2:84" + }, + "nativeSrc": "209:33:84", + "nodeType": "YulFunctionCall", + "src": "209:33:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "202:6:84", + "nodeType": "YulIdentifier", + "src": "202:6:84" + }, + "nativeSrc": "202:41:84", + "nodeType": "YulFunctionCall", + "src": "202:41:84" + }, + "nativeSrc": "199:61:84", + "nodeType": "YulIf", + "src": "199:61:84" + }, + { + "nativeSrc": "269:15:84", + "nodeType": "YulAssignment", + "src": "269:15:84", + "value": { + "name": "value", + "nativeSrc": "279:5:84", + "nodeType": "YulIdentifier", + "src": "279:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "269:6:84", + "nodeType": "YulIdentifier", + "src": "269:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint32", + "nativeSrc": "14:276:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "49:9:84", + "nodeType": "YulTypedName", + "src": "49:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "60:7:84", + "nodeType": "YulTypedName", + "src": "60:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "72:6:84", + "nodeType": "YulTypedName", + "src": "72:6:84", + "type": "" + } + ], + "src": "14:276:84" + }, + { + "body": { + "nativeSrc": "348:86:84", + "nodeType": "YulBlock", + "src": "348:86:84", + "statements": [ + { + "body": { + "nativeSrc": "412:16:84", + "nodeType": "YulBlock", + "src": "412:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "421:1:84", + "nodeType": "YulLiteral", + "src": "421:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "424:1:84", + "nodeType": "YulLiteral", + "src": "424:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "414:6:84", + "nodeType": "YulIdentifier", + "src": "414:6:84" + }, + "nativeSrc": "414:12:84", + "nodeType": "YulFunctionCall", + "src": "414:12:84" + }, + "nativeSrc": "414:12:84", + "nodeType": "YulExpressionStatement", + "src": "414:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "371:5:84", + "nodeType": "YulIdentifier", + "src": "371:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "382:5:84", + "nodeType": "YulIdentifier", + "src": "382:5:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "397:3:84", + "nodeType": "YulLiteral", + "src": "397:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "402:1:84", + "nodeType": "YulLiteral", + "src": "402:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "393:3:84", + "nodeType": "YulIdentifier", + "src": "393:3:84" + }, + "nativeSrc": "393:11:84", + "nodeType": "YulFunctionCall", + "src": "393:11:84" + }, + { + "kind": "number", + "nativeSrc": "406:1:84", + "nodeType": "YulLiteral", + "src": "406:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "389:3:84", + "nodeType": "YulIdentifier", + "src": "389:3:84" + }, + "nativeSrc": "389:19:84", + "nodeType": "YulFunctionCall", + "src": "389:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "378:3:84", + "nodeType": "YulIdentifier", + "src": "378:3:84" + }, + "nativeSrc": "378:31:84", + "nodeType": "YulFunctionCall", + "src": "378:31:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "368:2:84", + "nodeType": "YulIdentifier", + "src": "368:2:84" + }, + "nativeSrc": "368:42:84", + "nodeType": "YulFunctionCall", + "src": "368:42:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "361:6:84", + "nodeType": "YulIdentifier", + "src": "361:6:84" + }, + "nativeSrc": "361:50:84", + "nodeType": "YulFunctionCall", + "src": "361:50:84" + }, + "nativeSrc": "358:70:84", + "nodeType": "YulIf", + "src": "358:70:84" + } + ] + }, + "name": "validator_revert_address_payable", + "nativeSrc": "295:139:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "337:5:84", + "nodeType": "YulTypedName", + "src": "337:5:84", + "type": "" + } + ], + "src": "295:139:84" + }, + { + "body": { + "nativeSrc": "534:236:84", + "nodeType": "YulBlock", + "src": "534:236:84", + "statements": [ + { + "body": { + "nativeSrc": "580:16:84", + "nodeType": "YulBlock", + "src": "580:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "589:1:84", + "nodeType": "YulLiteral", + "src": "589:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "592:1:84", + "nodeType": "YulLiteral", + "src": "592:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "582:6:84", + "nodeType": "YulIdentifier", + "src": "582:6:84" + }, + "nativeSrc": "582:12:84", + "nodeType": "YulFunctionCall", + "src": "582:12:84" + }, + "nativeSrc": "582:12:84", + "nodeType": "YulExpressionStatement", + "src": "582:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "555:7:84", + "nodeType": "YulIdentifier", + "src": "555:7:84" + }, + { + "name": "headStart", + "nativeSrc": "564:9:84", + "nodeType": "YulIdentifier", + "src": "564:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "551:3:84", + "nodeType": "YulIdentifier", + "src": "551:3:84" + }, + "nativeSrc": "551:23:84", + "nodeType": "YulFunctionCall", + "src": "551:23:84" + }, + { + "kind": "number", + "nativeSrc": "576:2:84", + "nodeType": "YulLiteral", + "src": "576:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "547:3:84", + "nodeType": "YulIdentifier", + "src": "547:3:84" + }, + "nativeSrc": "547:32:84", + "nodeType": "YulFunctionCall", + "src": "547:32:84" + }, + "nativeSrc": "544:52:84", + "nodeType": "YulIf", + "src": "544:52:84" + }, + { + "nativeSrc": "605:36:84", + "nodeType": "YulVariableDeclaration", + "src": "605:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "631:9:84", + "nodeType": "YulIdentifier", + "src": "631:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "618:12:84", + "nodeType": "YulIdentifier", + "src": "618:12:84" + }, + "nativeSrc": "618:23:84", + "nodeType": "YulFunctionCall", + "src": "618:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "609:5:84", + "nodeType": "YulTypedName", + "src": "609:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "683:5:84", + "nodeType": "YulIdentifier", + "src": "683:5:84" + } + ], + "functionName": { + "name": "validator_revert_address_payable", + "nativeSrc": "650:32:84", + "nodeType": "YulIdentifier", + "src": "650:32:84" + }, + "nativeSrc": "650:39:84", + "nodeType": "YulFunctionCall", + "src": "650:39:84" + }, + "nativeSrc": "650:39:84", + "nodeType": "YulExpressionStatement", + "src": "650:39:84" + }, + { + "nativeSrc": "698:15:84", + "nodeType": "YulAssignment", + "src": "698:15:84", + "value": { + "name": "value", + "nativeSrc": "708:5:84", + "nodeType": "YulIdentifier", + "src": "708:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "698:6:84", + "nodeType": "YulIdentifier", + "src": "698:6:84" + } + ] + }, + { + "nativeSrc": "722:42:84", + "nodeType": "YulAssignment", + "src": "722:42:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "749:9:84", + "nodeType": "YulIdentifier", + "src": "749:9:84" + }, + { + "kind": "number", + "nativeSrc": "760:2:84", + "nodeType": "YulLiteral", + "src": "760:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "745:3:84", + "nodeType": "YulIdentifier", + "src": "745:3:84" + }, + "nativeSrc": "745:18:84", + "nodeType": "YulFunctionCall", + "src": "745:18:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "732:12:84", + "nodeType": "YulIdentifier", + "src": "732:12:84" + }, + "nativeSrc": "732:32:84", + "nodeType": "YulFunctionCall", + "src": "732:32:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "722:6:84", + "nodeType": "YulIdentifier", + "src": "722:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address_payablet_uint256", + "nativeSrc": "439:331:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "492:9:84", + "nodeType": "YulTypedName", + "src": "492:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "503:7:84", + "nodeType": "YulTypedName", + "src": "503:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "515:6:84", + "nodeType": "YulTypedName", + "src": "515:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "523:6:84", + "nodeType": "YulTypedName", + "src": "523:6:84", + "type": "" + } + ], + "src": "439:331:84" + }, + { + "body": { + "nativeSrc": "876:102:84", + "nodeType": "YulBlock", + "src": "876:102:84", + "statements": [ + { + "nativeSrc": "886:26:84", + "nodeType": "YulAssignment", + "src": "886:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "898:9:84", + "nodeType": "YulIdentifier", + "src": "898:9:84" + }, + { + "kind": "number", + "nativeSrc": "909:2:84", + "nodeType": "YulLiteral", + "src": "909:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "894:3:84", + "nodeType": "YulIdentifier", + "src": "894:3:84" + }, + "nativeSrc": "894:18:84", + "nodeType": "YulFunctionCall", + "src": "894:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "886:4:84", + "nodeType": "YulIdentifier", + "src": "886:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "928:9:84", + "nodeType": "YulIdentifier", + "src": "928:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "943:6:84", + "nodeType": "YulIdentifier", + "src": "943:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "959:3:84", + "nodeType": "YulLiteral", + "src": "959:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "964:1:84", + "nodeType": "YulLiteral", + "src": "964:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "955:3:84", + "nodeType": "YulIdentifier", + "src": "955:3:84" + }, + "nativeSrc": "955:11:84", + "nodeType": "YulFunctionCall", + "src": "955:11:84" + }, + { + "kind": "number", + "nativeSrc": "968:1:84", + "nodeType": "YulLiteral", + "src": "968:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "951:3:84", + "nodeType": "YulIdentifier", + "src": "951:3:84" + }, + "nativeSrc": "951:19:84", + "nodeType": "YulFunctionCall", + "src": "951:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "939:3:84", + "nodeType": "YulIdentifier", + "src": "939:3:84" + }, + "nativeSrc": "939:32:84", + "nodeType": "YulFunctionCall", + "src": "939:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "921:6:84", + "nodeType": "YulIdentifier", + "src": "921:6:84" + }, + "nativeSrc": "921:51:84", + "nodeType": "YulFunctionCall", + "src": "921:51:84" + }, + "nativeSrc": "921:51:84", + "nodeType": "YulExpressionStatement", + "src": "921:51:84" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "775:203:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "845:9:84", + "nodeType": "YulTypedName", + "src": "845:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "856:6:84", + "nodeType": "YulTypedName", + "src": "856:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "867:4:84", + "nodeType": "YulTypedName", + "src": "867:4:84", + "type": "" + } + ], + "src": "775:203:84" + }, + { + "body": { + "nativeSrc": "1065:86:84", + "nodeType": "YulBlock", + "src": "1065:86:84", + "statements": [ + { + "body": { + "nativeSrc": "1105:16:84", + "nodeType": "YulBlock", + "src": "1105:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1114:1:84", + "nodeType": "YulLiteral", + "src": "1114:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1117:1:84", + "nodeType": "YulLiteral", + "src": "1117:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1107:6:84", + "nodeType": "YulIdentifier", + "src": "1107:6:84" + }, + "nativeSrc": "1107:12:84", + "nodeType": "YulFunctionCall", + "src": "1107:12:84" + }, + "nativeSrc": "1107:12:84", + "nodeType": "YulExpressionStatement", + "src": "1107:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "end", + "nativeSrc": "1086:3:84", + "nodeType": "YulIdentifier", + "src": "1086:3:84" + }, + { + "name": "offset", + "nativeSrc": "1091:6:84", + "nodeType": "YulIdentifier", + "src": "1091:6:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1082:3:84", + "nodeType": "YulIdentifier", + "src": "1082:3:84" + }, + "nativeSrc": "1082:16:84", + "nodeType": "YulFunctionCall", + "src": "1082:16:84" + }, + { + "kind": "number", + "nativeSrc": "1100:3:84", + "nodeType": "YulLiteral", + "src": "1100:3:84", + "type": "", + "value": "288" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1078:3:84", + "nodeType": "YulIdentifier", + "src": "1078:3:84" + }, + "nativeSrc": "1078:26:84", + "nodeType": "YulFunctionCall", + "src": "1078:26:84" + }, + "nativeSrc": "1075:46:84", + "nodeType": "YulIf", + "src": "1075:46:84" + }, + { + "nativeSrc": "1130:15:84", + "nodeType": "YulAssignment", + "src": "1130:15:84", + "value": { + "name": "offset", + "nativeSrc": "1139:6:84", + "nodeType": "YulIdentifier", + "src": "1139:6:84" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "1130:5:84", + "nodeType": "YulIdentifier", + "src": "1130:5:84" + } + ] + } + ] + }, + "name": "abi_decode_struct_PackedUserOperation_calldata", + "nativeSrc": "983:168:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "1039:6:84", + "nodeType": "YulTypedName", + "src": "1039:6:84", + "type": "" + }, + { + "name": "end", + "nativeSrc": "1047:3:84", + "nodeType": "YulTypedName", + "src": "1047:3:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nativeSrc": "1055:5:84", + "nodeType": "YulTypedName", + "src": "1055:5:84", + "type": "" + } + ], + "src": "983:168:84" + }, + { + "body": { + "nativeSrc": "1299:373:84", + "nodeType": "YulBlock", + "src": "1299:373:84", + "statements": [ + { + "body": { + "nativeSrc": "1345:16:84", + "nodeType": "YulBlock", + "src": "1345:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1354:1:84", + "nodeType": "YulLiteral", + "src": "1354:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1357:1:84", + "nodeType": "YulLiteral", + "src": "1357:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1347:6:84", + "nodeType": "YulIdentifier", + "src": "1347:6:84" + }, + "nativeSrc": "1347:12:84", + "nodeType": "YulFunctionCall", + "src": "1347:12:84" + }, + "nativeSrc": "1347:12:84", + "nodeType": "YulExpressionStatement", + "src": "1347:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1320:7:84", + "nodeType": "YulIdentifier", + "src": "1320:7:84" + }, + { + "name": "headStart", + "nativeSrc": "1329:9:84", + "nodeType": "YulIdentifier", + "src": "1329:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1316:3:84", + "nodeType": "YulIdentifier", + "src": "1316:3:84" + }, + "nativeSrc": "1316:23:84", + "nodeType": "YulFunctionCall", + "src": "1316:23:84" + }, + { + "kind": "number", + "nativeSrc": "1341:2:84", + "nodeType": "YulLiteral", + "src": "1341:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1312:3:84", + "nodeType": "YulIdentifier", + "src": "1312:3:84" + }, + "nativeSrc": "1312:32:84", + "nodeType": "YulFunctionCall", + "src": "1312:32:84" + }, + "nativeSrc": "1309:52:84", + "nodeType": "YulIf", + "src": "1309:52:84" + }, + { + "nativeSrc": "1370:37:84", + "nodeType": "YulVariableDeclaration", + "src": "1370:37:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1397:9:84", + "nodeType": "YulIdentifier", + "src": "1397:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1384:12:84", + "nodeType": "YulIdentifier", + "src": "1384:12:84" + }, + "nativeSrc": "1384:23:84", + "nodeType": "YulFunctionCall", + "src": "1384:23:84" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "1374:6:84", + "nodeType": "YulTypedName", + "src": "1374:6:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1450:16:84", + "nodeType": "YulBlock", + "src": "1450:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1459:1:84", + "nodeType": "YulLiteral", + "src": "1459:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1462:1:84", + "nodeType": "YulLiteral", + "src": "1462:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1452:6:84", + "nodeType": "YulIdentifier", + "src": "1452:6:84" + }, + "nativeSrc": "1452:12:84", + "nodeType": "YulFunctionCall", + "src": "1452:12:84" + }, + "nativeSrc": "1452:12:84", + "nodeType": "YulExpressionStatement", + "src": "1452:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1422:6:84", + "nodeType": "YulIdentifier", + "src": "1422:6:84" + }, + { + "kind": "number", + "nativeSrc": "1430:18:84", + "nodeType": "YulLiteral", + "src": "1430:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1419:2:84", + "nodeType": "YulIdentifier", + "src": "1419:2:84" + }, + "nativeSrc": "1419:30:84", + "nodeType": "YulFunctionCall", + "src": "1419:30:84" + }, + "nativeSrc": "1416:50:84", + "nodeType": "YulIf", + "src": "1416:50:84" + }, + { + "nativeSrc": "1475:89:84", + "nodeType": "YulAssignment", + "src": "1475:89:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1536:9:84", + "nodeType": "YulIdentifier", + "src": "1536:9:84" + }, + { + "name": "offset", + "nativeSrc": "1547:6:84", + "nodeType": "YulIdentifier", + "src": "1547:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1532:3:84", + "nodeType": "YulIdentifier", + "src": "1532:3:84" + }, + "nativeSrc": "1532:22:84", + "nodeType": "YulFunctionCall", + "src": "1532:22:84" + }, + { + "name": "dataEnd", + "nativeSrc": "1556:7:84", + "nodeType": "YulIdentifier", + "src": "1556:7:84" + } + ], + "functionName": { + "name": "abi_decode_struct_PackedUserOperation_calldata", + "nativeSrc": "1485:46:84", + "nodeType": "YulIdentifier", + "src": "1485:46:84" + }, + "nativeSrc": "1485:79:84", + "nodeType": "YulFunctionCall", + "src": "1485:79:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1475:6:84", + "nodeType": "YulIdentifier", + "src": "1475:6:84" + } + ] + }, + { + "nativeSrc": "1573:42:84", + "nodeType": "YulAssignment", + "src": "1573:42:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1600:9:84", + "nodeType": "YulIdentifier", + "src": "1600:9:84" + }, + { + "kind": "number", + "nativeSrc": "1611:2:84", + "nodeType": "YulLiteral", + "src": "1611:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1596:3:84", + "nodeType": "YulIdentifier", + "src": "1596:3:84" + }, + "nativeSrc": "1596:18:84", + "nodeType": "YulFunctionCall", + "src": "1596:18:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1583:12:84", + "nodeType": "YulIdentifier", + "src": "1583:12:84" + }, + "nativeSrc": "1583:32:84", + "nodeType": "YulFunctionCall", + "src": "1583:32:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "1573:6:84", + "nodeType": "YulIdentifier", + "src": "1573:6:84" + } + ] + }, + { + "nativeSrc": "1624:42:84", + "nodeType": "YulAssignment", + "src": "1624:42:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1651:9:84", + "nodeType": "YulIdentifier", + "src": "1651:9:84" + }, + { + "kind": "number", + "nativeSrc": "1662:2:84", + "nodeType": "YulLiteral", + "src": "1662:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1647:3:84", + "nodeType": "YulIdentifier", + "src": "1647:3:84" + }, + "nativeSrc": "1647:18:84", + "nodeType": "YulFunctionCall", + "src": "1647:18:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1634:12:84", + "nodeType": "YulIdentifier", + "src": "1634:12:84" + }, + "nativeSrc": "1634:32:84", + "nodeType": "YulFunctionCall", + "src": "1634:32:84" + }, + "variableNames": [ + { + "name": "value2", + "nativeSrc": "1624:6:84", + "nodeType": "YulIdentifier", + "src": "1624:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_struct$_PackedUserOperation_$7243_calldata_ptrt_bytes32t_uint256", + "nativeSrc": "1156:516:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1249:9:84", + "nodeType": "YulTypedName", + "src": "1249:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1260:7:84", + "nodeType": "YulTypedName", + "src": "1260:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1272:6:84", + "nodeType": "YulTypedName", + "src": "1272:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1280:6:84", + "nodeType": "YulTypedName", + "src": "1280:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "1288:6:84", + "nodeType": "YulTypedName", + "src": "1288:6:84", + "type": "" + } + ], + "src": "1156:516:84" + }, + { + "body": { + "nativeSrc": "1824:455:84", + "nodeType": "YulBlock", + "src": "1824:455:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1841:9:84", + "nodeType": "YulIdentifier", + "src": "1841:9:84" + }, + { + "kind": "number", + "nativeSrc": "1852:2:84", + "nodeType": "YulLiteral", + "src": "1852:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1834:6:84", + "nodeType": "YulIdentifier", + "src": "1834:6:84" + }, + "nativeSrc": "1834:21:84", + "nodeType": "YulFunctionCall", + "src": "1834:21:84" + }, + "nativeSrc": "1834:21:84", + "nodeType": "YulExpressionStatement", + "src": "1834:21:84" + }, + { + "nativeSrc": "1864:27:84", + "nodeType": "YulVariableDeclaration", + "src": "1864:27:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "1884:6:84", + "nodeType": "YulIdentifier", + "src": "1884:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1878:5:84", + "nodeType": "YulIdentifier", + "src": "1878:5:84" + }, + "nativeSrc": "1878:13:84", + "nodeType": "YulFunctionCall", + "src": "1878:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "1868:6:84", + "nodeType": "YulTypedName", + "src": "1868:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1911:9:84", + "nodeType": "YulIdentifier", + "src": "1911:9:84" + }, + { + "kind": "number", + "nativeSrc": "1922:2:84", + "nodeType": "YulLiteral", + "src": "1922:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1907:3:84", + "nodeType": "YulIdentifier", + "src": "1907:3:84" + }, + "nativeSrc": "1907:18:84", + "nodeType": "YulFunctionCall", + "src": "1907:18:84" + }, + { + "name": "length", + "nativeSrc": "1927:6:84", + "nodeType": "YulIdentifier", + "src": "1927:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1900:6:84", + "nodeType": "YulIdentifier", + "src": "1900:6:84" + }, + "nativeSrc": "1900:34:84", + "nodeType": "YulFunctionCall", + "src": "1900:34:84" + }, + "nativeSrc": "1900:34:84", + "nodeType": "YulExpressionStatement", + "src": "1900:34:84" + }, + { + "nativeSrc": "1943:10:84", + "nodeType": "YulVariableDeclaration", + "src": "1943:10:84", + "value": { + "kind": "number", + "nativeSrc": "1952:1:84", + "nodeType": "YulLiteral", + "src": "1952:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "1947:1:84", + "nodeType": "YulTypedName", + "src": "1947:1:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2014:92:84", + "nodeType": "YulBlock", + "src": "2014:92:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2043:9:84", + "nodeType": "YulIdentifier", + "src": "2043:9:84" + }, + { + "name": "i", + "nativeSrc": "2054:1:84", + "nodeType": "YulIdentifier", + "src": "2054:1:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2039:3:84", + "nodeType": "YulIdentifier", + "src": "2039:3:84" + }, + "nativeSrc": "2039:17:84", + "nodeType": "YulFunctionCall", + "src": "2039:17:84" + }, + { + "kind": "number", + "nativeSrc": "2058:2:84", + "nodeType": "YulLiteral", + "src": "2058:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2035:3:84", + "nodeType": "YulIdentifier", + "src": "2035:3:84" + }, + "nativeSrc": "2035:26:84", + "nodeType": "YulFunctionCall", + "src": "2035:26:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "2077:6:84", + "nodeType": "YulIdentifier", + "src": "2077:6:84" + }, + { + "name": "i", + "nativeSrc": "2085:1:84", + "nodeType": "YulIdentifier", + "src": "2085:1:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2073:3:84", + "nodeType": "YulIdentifier", + "src": "2073:3:84" + }, + "nativeSrc": "2073:14:84", + "nodeType": "YulFunctionCall", + "src": "2073:14:84" + }, + { + "kind": "number", + "nativeSrc": "2089:4:84", + "nodeType": "YulLiteral", + "src": "2089:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2069:3:84", + "nodeType": "YulIdentifier", + "src": "2069:3:84" + }, + "nativeSrc": "2069:25:84", + "nodeType": "YulFunctionCall", + "src": "2069:25:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2063:5:84", + "nodeType": "YulIdentifier", + "src": "2063:5:84" + }, + "nativeSrc": "2063:32:84", + "nodeType": "YulFunctionCall", + "src": "2063:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2028:6:84", + "nodeType": "YulIdentifier", + "src": "2028:6:84" + }, + "nativeSrc": "2028:68:84", + "nodeType": "YulFunctionCall", + "src": "2028:68:84" + }, + "nativeSrc": "2028:68:84", + "nodeType": "YulExpressionStatement", + "src": "2028:68:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "1973:1:84", + "nodeType": "YulIdentifier", + "src": "1973:1:84" + }, + { + "name": "length", + "nativeSrc": "1976:6:84", + "nodeType": "YulIdentifier", + "src": "1976:6:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1970:2:84", + "nodeType": "YulIdentifier", + "src": "1970:2:84" + }, + "nativeSrc": "1970:13:84", + "nodeType": "YulFunctionCall", + "src": "1970:13:84" + }, + "nativeSrc": "1962:144:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "1984:21:84", + "nodeType": "YulBlock", + "src": "1984:21:84", + "statements": [ + { + "nativeSrc": "1986:17:84", + "nodeType": "YulAssignment", + "src": "1986:17:84", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "1995:1:84", + "nodeType": "YulIdentifier", + "src": "1995:1:84" + }, + { + "kind": "number", + "nativeSrc": "1998:4:84", + "nodeType": "YulLiteral", + "src": "1998:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1991:3:84", + "nodeType": "YulIdentifier", + "src": "1991:3:84" + }, + "nativeSrc": "1991:12:84", + "nodeType": "YulFunctionCall", + "src": "1991:12:84" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "1986:1:84", + "nodeType": "YulIdentifier", + "src": "1986:1:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "1966:3:84", + "nodeType": "YulBlock", + "src": "1966:3:84", + "statements": [] + }, + "src": "1962:144:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2130:9:84", + "nodeType": "YulIdentifier", + "src": "2130:9:84" + }, + { + "name": "length", + "nativeSrc": "2141:6:84", + "nodeType": "YulIdentifier", + "src": "2141:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2126:3:84", + "nodeType": "YulIdentifier", + "src": "2126:3:84" + }, + "nativeSrc": "2126:22:84", + "nodeType": "YulFunctionCall", + "src": "2126:22:84" + }, + { + "kind": "number", + "nativeSrc": "2150:2:84", + "nodeType": "YulLiteral", + "src": "2150:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2122:3:84", + "nodeType": "YulIdentifier", + "src": "2122:3:84" + }, + "nativeSrc": "2122:31:84", + "nodeType": "YulFunctionCall", + "src": "2122:31:84" + }, + { + "kind": "number", + "nativeSrc": "2155:1:84", + "nodeType": "YulLiteral", + "src": "2155:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2115:6:84", + "nodeType": "YulIdentifier", + "src": "2115:6:84" + }, + "nativeSrc": "2115:42:84", + "nodeType": "YulFunctionCall", + "src": "2115:42:84" + }, + "nativeSrc": "2115:42:84", + "nodeType": "YulExpressionStatement", + "src": "2115:42:84" + }, + { + "nativeSrc": "2166:62:84", + "nodeType": "YulAssignment", + "src": "2166:62:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2182:9:84", + "nodeType": "YulIdentifier", + "src": "2182:9:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "2201:6:84", + "nodeType": "YulIdentifier", + "src": "2201:6:84" + }, + { + "kind": "number", + "nativeSrc": "2209:2:84", + "nodeType": "YulLiteral", + "src": "2209:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2197:3:84", + "nodeType": "YulIdentifier", + "src": "2197:3:84" + }, + "nativeSrc": "2197:15:84", + "nodeType": "YulFunctionCall", + "src": "2197:15:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2218:2:84", + "nodeType": "YulLiteral", + "src": "2218:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "2214:3:84", + "nodeType": "YulIdentifier", + "src": "2214:3:84" + }, + "nativeSrc": "2214:7:84", + "nodeType": "YulFunctionCall", + "src": "2214:7:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2193:3:84", + "nodeType": "YulIdentifier", + "src": "2193:3:84" + }, + "nativeSrc": "2193:29:84", + "nodeType": "YulFunctionCall", + "src": "2193:29:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2178:3:84", + "nodeType": "YulIdentifier", + "src": "2178:3:84" + }, + "nativeSrc": "2178:45:84", + "nodeType": "YulFunctionCall", + "src": "2178:45:84" + }, + { + "kind": "number", + "nativeSrc": "2225:2:84", + "nodeType": "YulLiteral", + "src": "2225:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2174:3:84", + "nodeType": "YulIdentifier", + "src": "2174:3:84" + }, + "nativeSrc": "2174:54:84", + "nodeType": "YulFunctionCall", + "src": "2174:54:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2166:4:84", + "nodeType": "YulIdentifier", + "src": "2166:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2248:9:84", + "nodeType": "YulIdentifier", + "src": "2248:9:84" + }, + { + "kind": "number", + "nativeSrc": "2259:4:84", + "nodeType": "YulLiteral", + "src": "2259:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2244:3:84", + "nodeType": "YulIdentifier", + "src": "2244:3:84" + }, + "nativeSrc": "2244:20:84", + "nodeType": "YulFunctionCall", + "src": "2244:20:84" + }, + { + "name": "value1", + "nativeSrc": "2266:6:84", + "nodeType": "YulIdentifier", + "src": "2266:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2237:6:84", + "nodeType": "YulIdentifier", + "src": "2237:6:84" + }, + "nativeSrc": "2237:36:84", + "nodeType": "YulFunctionCall", + "src": "2237:36:84" + }, + "nativeSrc": "2237:36:84", + "nodeType": "YulExpressionStatement", + "src": "2237:36:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes_memory_ptr_t_uint256__to_t_bytes_memory_ptr_t_uint256__fromStack_reversed", + "nativeSrc": "1677:602:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1785:9:84", + "nodeType": "YulTypedName", + "src": "1785:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1796:6:84", + "nodeType": "YulTypedName", + "src": "1796:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "1804:6:84", + "nodeType": "YulTypedName", + "src": "1804:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "1815:4:84", + "nodeType": "YulTypedName", + "src": "1815:4:84", + "type": "" + } + ], + "src": "1677:602:84" + }, + { + "body": { + "nativeSrc": "2332:119:84", + "nodeType": "YulBlock", + "src": "2332:119:84", + "statements": [ + { + "nativeSrc": "2342:29:84", + "nodeType": "YulAssignment", + "src": "2342:29:84", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "2364:6:84", + "nodeType": "YulIdentifier", + "src": "2364:6:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2351:12:84", + "nodeType": "YulIdentifier", + "src": "2351:12:84" + }, + "nativeSrc": "2351:20:84", + "nodeType": "YulFunctionCall", + "src": "2351:20:84" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "2342:5:84", + "nodeType": "YulIdentifier", + "src": "2342:5:84" + } + ] + }, + { + "body": { + "nativeSrc": "2429:16:84", + "nodeType": "YulBlock", + "src": "2429:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2438:1:84", + "nodeType": "YulLiteral", + "src": "2438:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2441:1:84", + "nodeType": "YulLiteral", + "src": "2441:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2431:6:84", + "nodeType": "YulIdentifier", + "src": "2431:6:84" + }, + "nativeSrc": "2431:12:84", + "nodeType": "YulFunctionCall", + "src": "2431:12:84" + }, + "nativeSrc": "2431:12:84", + "nodeType": "YulExpressionStatement", + "src": "2431:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2393:5:84", + "nodeType": "YulIdentifier", + "src": "2393:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2404:5:84", + "nodeType": "YulIdentifier", + "src": "2404:5:84" + }, + { + "kind": "number", + "nativeSrc": "2411:14:84", + "nodeType": "YulLiteral", + "src": "2411:14:84", + "type": "", + "value": "0xffffffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2400:3:84", + "nodeType": "YulIdentifier", + "src": "2400:3:84" + }, + "nativeSrc": "2400:26:84", + "nodeType": "YulFunctionCall", + "src": "2400:26:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "2390:2:84", + "nodeType": "YulIdentifier", + "src": "2390:2:84" + }, + "nativeSrc": "2390:37:84", + "nodeType": "YulFunctionCall", + "src": "2390:37:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2383:6:84", + "nodeType": "YulIdentifier", + "src": "2383:6:84" + }, + "nativeSrc": "2383:45:84", + "nodeType": "YulFunctionCall", + "src": "2383:45:84" + }, + "nativeSrc": "2380:65:84", + "nodeType": "YulIf", + "src": "2380:65:84" + } + ] + }, + "name": "abi_decode_uint48", + "nativeSrc": "2284:167:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "2311:6:84", + "nodeType": "YulTypedName", + "src": "2311:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nativeSrc": "2322:5:84", + "nodeType": "YulTypedName", + "src": "2322:5:84", + "type": "" + } + ], + "src": "2284:167:84" + }, + { + "body": { + "nativeSrc": "2597:383:84", + "nodeType": "YulBlock", + "src": "2597:383:84", + "statements": [ + { + "body": { + "nativeSrc": "2643:16:84", + "nodeType": "YulBlock", + "src": "2643:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2652:1:84", + "nodeType": "YulLiteral", + "src": "2652:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2655:1:84", + "nodeType": "YulLiteral", + "src": "2655:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2645:6:84", + "nodeType": "YulIdentifier", + "src": "2645:6:84" + }, + "nativeSrc": "2645:12:84", + "nodeType": "YulFunctionCall", + "src": "2645:12:84" + }, + "nativeSrc": "2645:12:84", + "nodeType": "YulExpressionStatement", + "src": "2645:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "2618:7:84", + "nodeType": "YulIdentifier", + "src": "2618:7:84" + }, + { + "name": "headStart", + "nativeSrc": "2627:9:84", + "nodeType": "YulIdentifier", + "src": "2627:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2614:3:84", + "nodeType": "YulIdentifier", + "src": "2614:3:84" + }, + "nativeSrc": "2614:23:84", + "nodeType": "YulFunctionCall", + "src": "2614:23:84" + }, + { + "kind": "number", + "nativeSrc": "2639:2:84", + "nodeType": "YulLiteral", + "src": "2639:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "2610:3:84", + "nodeType": "YulIdentifier", + "src": "2610:3:84" + }, + "nativeSrc": "2610:32:84", + "nodeType": "YulFunctionCall", + "src": "2610:32:84" + }, + "nativeSrc": "2607:52:84", + "nodeType": "YulIf", + "src": "2607:52:84" + }, + { + "nativeSrc": "2668:37:84", + "nodeType": "YulVariableDeclaration", + "src": "2668:37:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2695:9:84", + "nodeType": "YulIdentifier", + "src": "2695:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2682:12:84", + "nodeType": "YulIdentifier", + "src": "2682:12:84" + }, + "nativeSrc": "2682:23:84", + "nodeType": "YulFunctionCall", + "src": "2682:23:84" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "2672:6:84", + "nodeType": "YulTypedName", + "src": "2672:6:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2748:16:84", + "nodeType": "YulBlock", + "src": "2748:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2757:1:84", + "nodeType": "YulLiteral", + "src": "2757:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2760:1:84", + "nodeType": "YulLiteral", + "src": "2760:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2750:6:84", + "nodeType": "YulIdentifier", + "src": "2750:6:84" + }, + "nativeSrc": "2750:12:84", + "nodeType": "YulFunctionCall", + "src": "2750:12:84" + }, + "nativeSrc": "2750:12:84", + "nodeType": "YulExpressionStatement", + "src": "2750:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "2720:6:84", + "nodeType": "YulIdentifier", + "src": "2720:6:84" + }, + { + "kind": "number", + "nativeSrc": "2728:18:84", + "nodeType": "YulLiteral", + "src": "2728:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "2717:2:84", + "nodeType": "YulIdentifier", + "src": "2717:2:84" + }, + "nativeSrc": "2717:30:84", + "nodeType": "YulFunctionCall", + "src": "2717:30:84" + }, + "nativeSrc": "2714:50:84", + "nodeType": "YulIf", + "src": "2714:50:84" + }, + { + "nativeSrc": "2773:89:84", + "nodeType": "YulAssignment", + "src": "2773:89:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2834:9:84", + "nodeType": "YulIdentifier", + "src": "2834:9:84" + }, + { + "name": "offset", + "nativeSrc": "2845:6:84", + "nodeType": "YulIdentifier", + "src": "2845:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2830:3:84", + "nodeType": "YulIdentifier", + "src": "2830:3:84" + }, + "nativeSrc": "2830:22:84", + "nodeType": "YulFunctionCall", + "src": "2830:22:84" + }, + { + "name": "dataEnd", + "nativeSrc": "2854:7:84", + "nodeType": "YulIdentifier", + "src": "2854:7:84" + } + ], + "functionName": { + "name": "abi_decode_struct_PackedUserOperation_calldata", + "nativeSrc": "2783:46:84", + "nodeType": "YulIdentifier", + "src": "2783:46:84" + }, + "nativeSrc": "2783:79:84", + "nodeType": "YulFunctionCall", + "src": "2783:79:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "2773:6:84", + "nodeType": "YulIdentifier", + "src": "2773:6:84" + } + ] + }, + { + "nativeSrc": "2871:47:84", + "nodeType": "YulAssignment", + "src": "2871:47:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2903:9:84", + "nodeType": "YulIdentifier", + "src": "2903:9:84" + }, + { + "kind": "number", + "nativeSrc": "2914:2:84", + "nodeType": "YulLiteral", + "src": "2914:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2899:3:84", + "nodeType": "YulIdentifier", + "src": "2899:3:84" + }, + "nativeSrc": "2899:18:84", + "nodeType": "YulFunctionCall", + "src": "2899:18:84" + } + ], + "functionName": { + "name": "abi_decode_uint48", + "nativeSrc": "2881:17:84", + "nodeType": "YulIdentifier", + "src": "2881:17:84" + }, + "nativeSrc": "2881:37:84", + "nodeType": "YulFunctionCall", + "src": "2881:37:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "2871:6:84", + "nodeType": "YulIdentifier", + "src": "2871:6:84" + } + ] + }, + { + "nativeSrc": "2927:47:84", + "nodeType": "YulAssignment", + "src": "2927:47:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2959:9:84", + "nodeType": "YulIdentifier", + "src": "2959:9:84" + }, + { + "kind": "number", + "nativeSrc": "2970:2:84", + "nodeType": "YulLiteral", + "src": "2970:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2955:3:84", + "nodeType": "YulIdentifier", + "src": "2955:3:84" + }, + "nativeSrc": "2955:18:84", + "nodeType": "YulFunctionCall", + "src": "2955:18:84" + } + ], + "functionName": { + "name": "abi_decode_uint48", + "nativeSrc": "2937:17:84", + "nodeType": "YulIdentifier", + "src": "2937:17:84" + }, + "nativeSrc": "2937:37:84", + "nodeType": "YulFunctionCall", + "src": "2937:37:84" + }, + "variableNames": [ + { + "name": "value2", + "nativeSrc": "2927:6:84", + "nodeType": "YulIdentifier", + "src": "2927:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_struct$_PackedUserOperation_$7243_calldata_ptrt_uint48t_uint48", + "nativeSrc": "2456:524:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2547:9:84", + "nodeType": "YulTypedName", + "src": "2547:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "2558:7:84", + "nodeType": "YulTypedName", + "src": "2558:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "2570:6:84", + "nodeType": "YulTypedName", + "src": "2570:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "2578:6:84", + "nodeType": "YulTypedName", + "src": "2578:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "2586:6:84", + "nodeType": "YulTypedName", + "src": "2586:6:84", + "type": "" + } + ], + "src": "2456:524:84" + }, + { + "body": { + "nativeSrc": "3086:76:84", + "nodeType": "YulBlock", + "src": "3086:76:84", + "statements": [ + { + "nativeSrc": "3096:26:84", + "nodeType": "YulAssignment", + "src": "3096:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3108:9:84", + "nodeType": "YulIdentifier", + "src": "3108:9:84" + }, + { + "kind": "number", + "nativeSrc": "3119:2:84", + "nodeType": "YulLiteral", + "src": "3119:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3104:3:84", + "nodeType": "YulIdentifier", + "src": "3104:3:84" + }, + "nativeSrc": "3104:18:84", + "nodeType": "YulFunctionCall", + "src": "3104:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3096:4:84", + "nodeType": "YulIdentifier", + "src": "3096:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3138:9:84", + "nodeType": "YulIdentifier", + "src": "3138:9:84" + }, + { + "name": "value0", + "nativeSrc": "3149:6:84", + "nodeType": "YulIdentifier", + "src": "3149:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3131:6:84", + "nodeType": "YulIdentifier", + "src": "3131:6:84" + }, + "nativeSrc": "3131:25:84", + "nodeType": "YulFunctionCall", + "src": "3131:25:84" + }, + "nativeSrc": "3131:25:84", + "nodeType": "YulExpressionStatement", + "src": "3131:25:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed", + "nativeSrc": "2985:177:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3055:9:84", + "nodeType": "YulTypedName", + "src": "3055:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "3066:6:84", + "nodeType": "YulTypedName", + "src": "3066:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3077:4:84", + "nodeType": "YulTypedName", + "src": "3077:4:84", + "type": "" + } + ], + "src": "2985:177:84" + }, + { + "body": { + "nativeSrc": "3239:275:84", + "nodeType": "YulBlock", + "src": "3239:275:84", + "statements": [ + { + "body": { + "nativeSrc": "3288:16:84", + "nodeType": "YulBlock", + "src": "3288:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3297:1:84", + "nodeType": "YulLiteral", + "src": "3297:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3300:1:84", + "nodeType": "YulLiteral", + "src": "3300:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3290:6:84", + "nodeType": "YulIdentifier", + "src": "3290:6:84" + }, + "nativeSrc": "3290:12:84", + "nodeType": "YulFunctionCall", + "src": "3290:12:84" + }, + "nativeSrc": "3290:12:84", + "nodeType": "YulExpressionStatement", + "src": "3290:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "3267:6:84", + "nodeType": "YulIdentifier", + "src": "3267:6:84" + }, + { + "kind": "number", + "nativeSrc": "3275:4:84", + "nodeType": "YulLiteral", + "src": "3275:4:84", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3263:3:84", + "nodeType": "YulIdentifier", + "src": "3263:3:84" + }, + "nativeSrc": "3263:17:84", + "nodeType": "YulFunctionCall", + "src": "3263:17:84" + }, + { + "name": "end", + "nativeSrc": "3282:3:84", + "nodeType": "YulIdentifier", + "src": "3282:3:84" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "3259:3:84", + "nodeType": "YulIdentifier", + "src": "3259:3:84" + }, + "nativeSrc": "3259:27:84", + "nodeType": "YulFunctionCall", + "src": "3259:27:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3252:6:84", + "nodeType": "YulIdentifier", + "src": "3252:6:84" + }, + "nativeSrc": "3252:35:84", + "nodeType": "YulFunctionCall", + "src": "3252:35:84" + }, + "nativeSrc": "3249:55:84", + "nodeType": "YulIf", + "src": "3249:55:84" + }, + { + "nativeSrc": "3313:30:84", + "nodeType": "YulAssignment", + "src": "3313:30:84", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "3336:6:84", + "nodeType": "YulIdentifier", + "src": "3336:6:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3323:12:84", + "nodeType": "YulIdentifier", + "src": "3323:12:84" + }, + "nativeSrc": "3323:20:84", + "nodeType": "YulFunctionCall", + "src": "3323:20:84" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "3313:6:84", + "nodeType": "YulIdentifier", + "src": "3313:6:84" + } + ] + }, + { + "body": { + "nativeSrc": "3386:16:84", + "nodeType": "YulBlock", + "src": "3386:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3395:1:84", + "nodeType": "YulLiteral", + "src": "3395:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3398:1:84", + "nodeType": "YulLiteral", + "src": "3398:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3388:6:84", + "nodeType": "YulIdentifier", + "src": "3388:6:84" + }, + "nativeSrc": "3388:12:84", + "nodeType": "YulFunctionCall", + "src": "3388:12:84" + }, + "nativeSrc": "3388:12:84", + "nodeType": "YulExpressionStatement", + "src": "3388:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nativeSrc": "3358:6:84", + "nodeType": "YulIdentifier", + "src": "3358:6:84" + }, + { + "kind": "number", + "nativeSrc": "3366:18:84", + "nodeType": "YulLiteral", + "src": "3366:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "3355:2:84", + "nodeType": "YulIdentifier", + "src": "3355:2:84" + }, + "nativeSrc": "3355:30:84", + "nodeType": "YulFunctionCall", + "src": "3355:30:84" + }, + "nativeSrc": "3352:50:84", + "nodeType": "YulIf", + "src": "3352:50:84" + }, + { + "nativeSrc": "3411:29:84", + "nodeType": "YulAssignment", + "src": "3411:29:84", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "3427:6:84", + "nodeType": "YulIdentifier", + "src": "3427:6:84" + }, + { + "kind": "number", + "nativeSrc": "3435:4:84", + "nodeType": "YulLiteral", + "src": "3435:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3423:3:84", + "nodeType": "YulIdentifier", + "src": "3423:3:84" + }, + "nativeSrc": "3423:17:84", + "nodeType": "YulFunctionCall", + "src": "3423:17:84" + }, + "variableNames": [ + { + "name": "arrayPos", + "nativeSrc": "3411:8:84", + "nodeType": "YulIdentifier", + "src": "3411:8:84" + } + ] + }, + { + "body": { + "nativeSrc": "3492:16:84", + "nodeType": "YulBlock", + "src": "3492:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3501:1:84", + "nodeType": "YulLiteral", + "src": "3501:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3504:1:84", + "nodeType": "YulLiteral", + "src": "3504:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3494:6:84", + "nodeType": "YulIdentifier", + "src": "3494:6:84" + }, + "nativeSrc": "3494:12:84", + "nodeType": "YulFunctionCall", + "src": "3494:12:84" + }, + "nativeSrc": "3494:12:84", + "nodeType": "YulExpressionStatement", + "src": "3494:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "3463:6:84", + "nodeType": "YulIdentifier", + "src": "3463:6:84" + }, + { + "name": "length", + "nativeSrc": "3471:6:84", + "nodeType": "YulIdentifier", + "src": "3471:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3459:3:84", + "nodeType": "YulIdentifier", + "src": "3459:3:84" + }, + "nativeSrc": "3459:19:84", + "nodeType": "YulFunctionCall", + "src": "3459:19:84" + }, + { + "kind": "number", + "nativeSrc": "3480:4:84", + "nodeType": "YulLiteral", + "src": "3480:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3455:3:84", + "nodeType": "YulIdentifier", + "src": "3455:3:84" + }, + "nativeSrc": "3455:30:84", + "nodeType": "YulFunctionCall", + "src": "3455:30:84" + }, + { + "name": "end", + "nativeSrc": "3487:3:84", + "nodeType": "YulIdentifier", + "src": "3487:3:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "3452:2:84", + "nodeType": "YulIdentifier", + "src": "3452:2:84" + }, + "nativeSrc": "3452:39:84", + "nodeType": "YulFunctionCall", + "src": "3452:39:84" + }, + "nativeSrc": "3449:59:84", + "nodeType": "YulIf", + "src": "3449:59:84" + } + ] + }, + "name": "abi_decode_bytes_calldata", + "nativeSrc": "3167:347:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "3202:6:84", + "nodeType": "YulTypedName", + "src": "3202:6:84", + "type": "" + }, + { + "name": "end", + "nativeSrc": "3210:3:84", + "nodeType": "YulTypedName", + "src": "3210:3:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "arrayPos", + "nativeSrc": "3218:8:84", + "nodeType": "YulTypedName", + "src": "3218:8:84", + "type": "" + }, + { + "name": "length", + "nativeSrc": "3228:6:84", + "nodeType": "YulTypedName", + "src": "3228:6:84", + "type": "" + } + ], + "src": "3167:347:84" + }, + { + "body": { + "nativeSrc": "3674:550:84", + "nodeType": "YulBlock", + "src": "3674:550:84", + "statements": [ + { + "body": { + "nativeSrc": "3721:16:84", + "nodeType": "YulBlock", + "src": "3721:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3730:1:84", + "nodeType": "YulLiteral", + "src": "3730:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3733:1:84", + "nodeType": "YulLiteral", + "src": "3733:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3723:6:84", + "nodeType": "YulIdentifier", + "src": "3723:6:84" + }, + "nativeSrc": "3723:12:84", + "nodeType": "YulFunctionCall", + "src": "3723:12:84" + }, + "nativeSrc": "3723:12:84", + "nodeType": "YulExpressionStatement", + "src": "3723:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "3695:7:84", + "nodeType": "YulIdentifier", + "src": "3695:7:84" + }, + { + "name": "headStart", + "nativeSrc": "3704:9:84", + "nodeType": "YulIdentifier", + "src": "3704:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3691:3:84", + "nodeType": "YulIdentifier", + "src": "3691:3:84" + }, + "nativeSrc": "3691:23:84", + "nodeType": "YulFunctionCall", + "src": "3691:23:84" + }, + { + "kind": "number", + "nativeSrc": "3716:3:84", + "nodeType": "YulLiteral", + "src": "3716:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "3687:3:84", + "nodeType": "YulIdentifier", + "src": "3687:3:84" + }, + "nativeSrc": "3687:33:84", + "nodeType": "YulFunctionCall", + "src": "3687:33:84" + }, + "nativeSrc": "3684:53:84", + "nodeType": "YulIf", + "src": "3684:53:84" + }, + { + "nativeSrc": "3746:36:84", + "nodeType": "YulVariableDeclaration", + "src": "3746:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3772:9:84", + "nodeType": "YulIdentifier", + "src": "3772:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3759:12:84", + "nodeType": "YulIdentifier", + "src": "3759:12:84" + }, + "nativeSrc": "3759:23:84", + "nodeType": "YulFunctionCall", + "src": "3759:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "3750:5:84", + "nodeType": "YulTypedName", + "src": "3750:5:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3815:16:84", + "nodeType": "YulBlock", + "src": "3815:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3824:1:84", + "nodeType": "YulLiteral", + "src": "3824:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3827:1:84", + "nodeType": "YulLiteral", + "src": "3827:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3817:6:84", + "nodeType": "YulIdentifier", + "src": "3817:6:84" + }, + "nativeSrc": "3817:12:84", + "nodeType": "YulFunctionCall", + "src": "3817:12:84" + }, + "nativeSrc": "3817:12:84", + "nodeType": "YulExpressionStatement", + "src": "3817:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3804:5:84", + "nodeType": "YulIdentifier", + "src": "3804:5:84" + }, + { + "kind": "number", + "nativeSrc": "3811:1:84", + "nodeType": "YulLiteral", + "src": "3811:1:84", + "type": "", + "value": "3" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "3801:2:84", + "nodeType": "YulIdentifier", + "src": "3801:2:84" + }, + "nativeSrc": "3801:12:84", + "nodeType": "YulFunctionCall", + "src": "3801:12:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3794:6:84", + "nodeType": "YulIdentifier", + "src": "3794:6:84" + }, + "nativeSrc": "3794:20:84", + "nodeType": "YulFunctionCall", + "src": "3794:20:84" + }, + "nativeSrc": "3791:40:84", + "nodeType": "YulIf", + "src": "3791:40:84" + }, + { + "nativeSrc": "3840:15:84", + "nodeType": "YulAssignment", + "src": "3840:15:84", + "value": { + "name": "value", + "nativeSrc": "3850:5:84", + "nodeType": "YulIdentifier", + "src": "3850:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "3840:6:84", + "nodeType": "YulIdentifier", + "src": "3840:6:84" + } + ] + }, + { + "nativeSrc": "3864:46:84", + "nodeType": "YulVariableDeclaration", + "src": "3864:46:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3895:9:84", + "nodeType": "YulIdentifier", + "src": "3895:9:84" + }, + { + "kind": "number", + "nativeSrc": "3906:2:84", + "nodeType": "YulLiteral", + "src": "3906:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3891:3:84", + "nodeType": "YulIdentifier", + "src": "3891:3:84" + }, + "nativeSrc": "3891:18:84", + "nodeType": "YulFunctionCall", + "src": "3891:18:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3878:12:84", + "nodeType": "YulIdentifier", + "src": "3878:12:84" + }, + "nativeSrc": "3878:32:84", + "nodeType": "YulFunctionCall", + "src": "3878:32:84" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "3868:6:84", + "nodeType": "YulTypedName", + "src": "3868:6:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3953:16:84", + "nodeType": "YulBlock", + "src": "3953:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3962:1:84", + "nodeType": "YulLiteral", + "src": "3962:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3965:1:84", + "nodeType": "YulLiteral", + "src": "3965:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3955:6:84", + "nodeType": "YulIdentifier", + "src": "3955:6:84" + }, + "nativeSrc": "3955:12:84", + "nodeType": "YulFunctionCall", + "src": "3955:12:84" + }, + "nativeSrc": "3955:12:84", + "nodeType": "YulExpressionStatement", + "src": "3955:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "3925:6:84", + "nodeType": "YulIdentifier", + "src": "3925:6:84" + }, + { + "kind": "number", + "nativeSrc": "3933:18:84", + "nodeType": "YulLiteral", + "src": "3933:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "3922:2:84", + "nodeType": "YulIdentifier", + "src": "3922:2:84" + }, + "nativeSrc": "3922:30:84", + "nodeType": "YulFunctionCall", + "src": "3922:30:84" + }, + "nativeSrc": "3919:50:84", + "nodeType": "YulIf", + "src": "3919:50:84" + }, + { + "nativeSrc": "3978:84:84", + "nodeType": "YulVariableDeclaration", + "src": "3978:84:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4034:9:84", + "nodeType": "YulIdentifier", + "src": "4034:9:84" + }, + { + "name": "offset", + "nativeSrc": "4045:6:84", + "nodeType": "YulIdentifier", + "src": "4045:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4030:3:84", + "nodeType": "YulIdentifier", + "src": "4030:3:84" + }, + "nativeSrc": "4030:22:84", + "nodeType": "YulFunctionCall", + "src": "4030:22:84" + }, + { + "name": "dataEnd", + "nativeSrc": "4054:7:84", + "nodeType": "YulIdentifier", + "src": "4054:7:84" + } + ], + "functionName": { + "name": "abi_decode_bytes_calldata", + "nativeSrc": "4004:25:84", + "nodeType": "YulIdentifier", + "src": "4004:25:84" + }, + "nativeSrc": "4004:58:84", + "nodeType": "YulFunctionCall", + "src": "4004:58:84" + }, + "variables": [ + { + "name": "value1_1", + "nativeSrc": "3982:8:84", + "nodeType": "YulTypedName", + "src": "3982:8:84", + "type": "" + }, + { + "name": "value2_1", + "nativeSrc": "3992:8:84", + "nodeType": "YulTypedName", + "src": "3992:8:84", + "type": "" + } + ] + }, + { + "nativeSrc": "4071:18:84", + "nodeType": "YulAssignment", + "src": "4071:18:84", + "value": { + "name": "value1_1", + "nativeSrc": "4081:8:84", + "nodeType": "YulIdentifier", + "src": "4081:8:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "4071:6:84", + "nodeType": "YulIdentifier", + "src": "4071:6:84" + } + ] + }, + { + "nativeSrc": "4098:18:84", + "nodeType": "YulAssignment", + "src": "4098:18:84", + "value": { + "name": "value2_1", + "nativeSrc": "4108:8:84", + "nodeType": "YulIdentifier", + "src": "4108:8:84" + }, + "variableNames": [ + { + "name": "value2", + "nativeSrc": "4098:6:84", + "nodeType": "YulIdentifier", + "src": "4098:6:84" + } + ] + }, + { + "nativeSrc": "4125:42:84", + "nodeType": "YulAssignment", + "src": "4125:42:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4152:9:84", + "nodeType": "YulIdentifier", + "src": "4152:9:84" + }, + { + "kind": "number", + "nativeSrc": "4163:2:84", + "nodeType": "YulLiteral", + "src": "4163:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4148:3:84", + "nodeType": "YulIdentifier", + "src": "4148:3:84" + }, + "nativeSrc": "4148:18:84", + "nodeType": "YulFunctionCall", + "src": "4148:18:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "4135:12:84", + "nodeType": "YulIdentifier", + "src": "4135:12:84" + }, + "nativeSrc": "4135:32:84", + "nodeType": "YulFunctionCall", + "src": "4135:32:84" + }, + "variableNames": [ + { + "name": "value3", + "nativeSrc": "4125:6:84", + "nodeType": "YulIdentifier", + "src": "4125:6:84" + } + ] + }, + { + "nativeSrc": "4176:42:84", + "nodeType": "YulAssignment", + "src": "4176:42:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4203:9:84", + "nodeType": "YulIdentifier", + "src": "4203:9:84" + }, + { + "kind": "number", + "nativeSrc": "4214:2:84", + "nodeType": "YulLiteral", + "src": "4214:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4199:3:84", + "nodeType": "YulIdentifier", + "src": "4199:3:84" + }, + "nativeSrc": "4199:18:84", + "nodeType": "YulFunctionCall", + "src": "4199:18:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "4186:12:84", + "nodeType": "YulIdentifier", + "src": "4186:12:84" + }, + "nativeSrc": "4186:32:84", + "nodeType": "YulFunctionCall", + "src": "4186:32:84" + }, + "variableNames": [ + { + "name": "value4", + "nativeSrc": "4176:6:84", + "nodeType": "YulIdentifier", + "src": "4176:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_enum$_PostOpMode_$7088t_bytes_calldata_ptrt_uint256t_uint256", + "nativeSrc": "3519:705:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3608:9:84", + "nodeType": "YulTypedName", + "src": "3608:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "3619:7:84", + "nodeType": "YulTypedName", + "src": "3619:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "3631:6:84", + "nodeType": "YulTypedName", + "src": "3631:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "3639:6:84", + "nodeType": "YulTypedName", + "src": "3639:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "3647:6:84", + "nodeType": "YulTypedName", + "src": "3647:6:84", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "3655:6:84", + "nodeType": "YulTypedName", + "src": "3655:6:84", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "3663:6:84", + "nodeType": "YulTypedName", + "src": "3663:6:84", + "type": "" + } + ], + "src": "3519:705:84" + }, + { + "body": { + "nativeSrc": "4299:185:84", + "nodeType": "YulBlock", + "src": "4299:185:84", + "statements": [ + { + "body": { + "nativeSrc": "4345:16:84", + "nodeType": "YulBlock", + "src": "4345:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4354:1:84", + "nodeType": "YulLiteral", + "src": "4354:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "4357:1:84", + "nodeType": "YulLiteral", + "src": "4357:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "4347:6:84", + "nodeType": "YulIdentifier", + "src": "4347:6:84" + }, + "nativeSrc": "4347:12:84", + "nodeType": "YulFunctionCall", + "src": "4347:12:84" + }, + "nativeSrc": "4347:12:84", + "nodeType": "YulExpressionStatement", + "src": "4347:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "4320:7:84", + "nodeType": "YulIdentifier", + "src": "4320:7:84" + }, + { + "name": "headStart", + "nativeSrc": "4329:9:84", + "nodeType": "YulIdentifier", + "src": "4329:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4316:3:84", + "nodeType": "YulIdentifier", + "src": "4316:3:84" + }, + "nativeSrc": "4316:23:84", + "nodeType": "YulFunctionCall", + "src": "4316:23:84" + }, + { + "kind": "number", + "nativeSrc": "4341:2:84", + "nodeType": "YulLiteral", + "src": "4341:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "4312:3:84", + "nodeType": "YulIdentifier", + "src": "4312:3:84" + }, + "nativeSrc": "4312:32:84", + "nodeType": "YulFunctionCall", + "src": "4312:32:84" + }, + "nativeSrc": "4309:52:84", + "nodeType": "YulIf", + "src": "4309:52:84" + }, + { + "nativeSrc": "4370:36:84", + "nodeType": "YulVariableDeclaration", + "src": "4370:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4396:9:84", + "nodeType": "YulIdentifier", + "src": "4396:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "4383:12:84", + "nodeType": "YulIdentifier", + "src": "4383:12:84" + }, + "nativeSrc": "4383:23:84", + "nodeType": "YulFunctionCall", + "src": "4383:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "4374:5:84", + "nodeType": "YulTypedName", + "src": "4374:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "4448:5:84", + "nodeType": "YulIdentifier", + "src": "4448:5:84" + } + ], + "functionName": { + "name": "validator_revert_address_payable", + "nativeSrc": "4415:32:84", + "nodeType": "YulIdentifier", + "src": "4415:32:84" + }, + "nativeSrc": "4415:39:84", + "nodeType": "YulFunctionCall", + "src": "4415:39:84" + }, + "nativeSrc": "4415:39:84", + "nodeType": "YulExpressionStatement", + "src": "4415:39:84" + }, + { + "nativeSrc": "4463:15:84", + "nodeType": "YulAssignment", + "src": "4463:15:84", + "value": { + "name": "value", + "nativeSrc": "4473:5:84", + "nodeType": "YulIdentifier", + "src": "4473:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "4463:6:84", + "nodeType": "YulIdentifier", + "src": "4463:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address", + "nativeSrc": "4229:255:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4265:9:84", + "nodeType": "YulTypedName", + "src": "4265:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "4276:7:84", + "nodeType": "YulTypedName", + "src": "4276:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "4288:6:84", + "nodeType": "YulTypedName", + "src": "4288:6:84", + "type": "" + } + ], + "src": "4229:255:84" + }, + { + "body": { + "nativeSrc": "4578:320:84", + "nodeType": "YulBlock", + "src": "4578:320:84", + "statements": [ + { + "body": { + "nativeSrc": "4624:16:84", + "nodeType": "YulBlock", + "src": "4624:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4633:1:84", + "nodeType": "YulLiteral", + "src": "4633:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "4636:1:84", + "nodeType": "YulLiteral", + "src": "4636:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "4626:6:84", + "nodeType": "YulIdentifier", + "src": "4626:6:84" + }, + "nativeSrc": "4626:12:84", + "nodeType": "YulFunctionCall", + "src": "4626:12:84" + }, + "nativeSrc": "4626:12:84", + "nodeType": "YulExpressionStatement", + "src": "4626:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "4599:7:84", + "nodeType": "YulIdentifier", + "src": "4599:7:84" + }, + { + "name": "headStart", + "nativeSrc": "4608:9:84", + "nodeType": "YulIdentifier", + "src": "4608:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4595:3:84", + "nodeType": "YulIdentifier", + "src": "4595:3:84" + }, + "nativeSrc": "4595:23:84", + "nodeType": "YulFunctionCall", + "src": "4595:23:84" + }, + { + "kind": "number", + "nativeSrc": "4620:2:84", + "nodeType": "YulLiteral", + "src": "4620:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "4591:3:84", + "nodeType": "YulIdentifier", + "src": "4591:3:84" + }, + "nativeSrc": "4591:32:84", + "nodeType": "YulFunctionCall", + "src": "4591:32:84" + }, + "nativeSrc": "4588:52:84", + "nodeType": "YulIf", + "src": "4588:52:84" + }, + { + "nativeSrc": "4649:37:84", + "nodeType": "YulVariableDeclaration", + "src": "4649:37:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4676:9:84", + "nodeType": "YulIdentifier", + "src": "4676:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "4663:12:84", + "nodeType": "YulIdentifier", + "src": "4663:12:84" + }, + "nativeSrc": "4663:23:84", + "nodeType": "YulFunctionCall", + "src": "4663:23:84" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "4653:6:84", + "nodeType": "YulTypedName", + "src": "4653:6:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "4729:16:84", + "nodeType": "YulBlock", + "src": "4729:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4738:1:84", + "nodeType": "YulLiteral", + "src": "4738:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "4741:1:84", + "nodeType": "YulLiteral", + "src": "4741:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "4731:6:84", + "nodeType": "YulIdentifier", + "src": "4731:6:84" + }, + "nativeSrc": "4731:12:84", + "nodeType": "YulFunctionCall", + "src": "4731:12:84" + }, + "nativeSrc": "4731:12:84", + "nodeType": "YulExpressionStatement", + "src": "4731:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "4701:6:84", + "nodeType": "YulIdentifier", + "src": "4701:6:84" + }, + { + "kind": "number", + "nativeSrc": "4709:18:84", + "nodeType": "YulLiteral", + "src": "4709:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "4698:2:84", + "nodeType": "YulIdentifier", + "src": "4698:2:84" + }, + "nativeSrc": "4698:30:84", + "nodeType": "YulFunctionCall", + "src": "4698:30:84" + }, + "nativeSrc": "4695:50:84", + "nodeType": "YulIf", + "src": "4695:50:84" + }, + { + "nativeSrc": "4754:84:84", + "nodeType": "YulVariableDeclaration", + "src": "4754:84:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4810:9:84", + "nodeType": "YulIdentifier", + "src": "4810:9:84" + }, + { + "name": "offset", + "nativeSrc": "4821:6:84", + "nodeType": "YulIdentifier", + "src": "4821:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4806:3:84", + "nodeType": "YulIdentifier", + "src": "4806:3:84" + }, + "nativeSrc": "4806:22:84", + "nodeType": "YulFunctionCall", + "src": "4806:22:84" + }, + { + "name": "dataEnd", + "nativeSrc": "4830:7:84", + "nodeType": "YulIdentifier", + "src": "4830:7:84" + } + ], + "functionName": { + "name": "abi_decode_bytes_calldata", + "nativeSrc": "4780:25:84", + "nodeType": "YulIdentifier", + "src": "4780:25:84" + }, + "nativeSrc": "4780:58:84", + "nodeType": "YulFunctionCall", + "src": "4780:58:84" + }, + "variables": [ + { + "name": "value0_1", + "nativeSrc": "4758:8:84", + "nodeType": "YulTypedName", + "src": "4758:8:84", + "type": "" + }, + { + "name": "value1_1", + "nativeSrc": "4768:8:84", + "nodeType": "YulTypedName", + "src": "4768:8:84", + "type": "" + } + ] + }, + { + "nativeSrc": "4847:18:84", + "nodeType": "YulAssignment", + "src": "4847:18:84", + "value": { + "name": "value0_1", + "nativeSrc": "4857:8:84", + "nodeType": "YulIdentifier", + "src": "4857:8:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "4847:6:84", + "nodeType": "YulIdentifier", + "src": "4847:6:84" + } + ] + }, + { + "nativeSrc": "4874:18:84", + "nodeType": "YulAssignment", + "src": "4874:18:84", + "value": { + "name": "value1_1", + "nativeSrc": "4884:8:84", + "nodeType": "YulIdentifier", + "src": "4884:8:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "4874:6:84", + "nodeType": "YulIdentifier", + "src": "4874:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes_calldata_ptr", + "nativeSrc": "4489:409:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4536:9:84", + "nodeType": "YulTypedName", + "src": "4536:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "4547:7:84", + "nodeType": "YulTypedName", + "src": "4547:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "4559:6:84", + "nodeType": "YulTypedName", + "src": "4559:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "4567:6:84", + "nodeType": "YulTypedName", + "src": "4567:6:84", + "type": "" + } + ], + "src": "4489:409:84" + }, + { + "body": { + "nativeSrc": "5084:399:84", + "nodeType": "YulBlock", + "src": "5084:399:84", + "statements": [ + { + "nativeSrc": "5094:24:84", + "nodeType": "YulVariableDeclaration", + "src": "5094:24:84", + "value": { + "kind": "number", + "nativeSrc": "5104:14:84", + "nodeType": "YulLiteral", + "src": "5104:14:84", + "type": "", + "value": "0xffffffffffff" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "5098:2:84", + "nodeType": "YulTypedName", + "src": "5098:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5134:9:84", + "nodeType": "YulIdentifier", + "src": "5134:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "5149:6:84", + "nodeType": "YulIdentifier", + "src": "5149:6:84" + }, + { + "name": "_1", + "nativeSrc": "5157:2:84", + "nodeType": "YulIdentifier", + "src": "5157:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5145:3:84", + "nodeType": "YulIdentifier", + "src": "5145:3:84" + }, + "nativeSrc": "5145:15:84", + "nodeType": "YulFunctionCall", + "src": "5145:15:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5127:6:84", + "nodeType": "YulIdentifier", + "src": "5127:6:84" + }, + "nativeSrc": "5127:34:84", + "nodeType": "YulFunctionCall", + "src": "5127:34:84" + }, + "nativeSrc": "5127:34:84", + "nodeType": "YulExpressionStatement", + "src": "5127:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5181:9:84", + "nodeType": "YulIdentifier", + "src": "5181:9:84" + }, + { + "kind": "number", + "nativeSrc": "5192:2:84", + "nodeType": "YulLiteral", + "src": "5192:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5177:3:84", + "nodeType": "YulIdentifier", + "src": "5177:3:84" + }, + "nativeSrc": "5177:18:84", + "nodeType": "YulFunctionCall", + "src": "5177:18:84" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "5201:6:84", + "nodeType": "YulIdentifier", + "src": "5201:6:84" + }, + { + "name": "_1", + "nativeSrc": "5209:2:84", + "nodeType": "YulIdentifier", + "src": "5209:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5197:3:84", + "nodeType": "YulIdentifier", + "src": "5197:3:84" + }, + "nativeSrc": "5197:15:84", + "nodeType": "YulFunctionCall", + "src": "5197:15:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5170:6:84", + "nodeType": "YulIdentifier", + "src": "5170:6:84" + }, + "nativeSrc": "5170:43:84", + "nodeType": "YulFunctionCall", + "src": "5170:43:84" + }, + "nativeSrc": "5170:43:84", + "nodeType": "YulExpressionStatement", + "src": "5170:43:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5233:9:84", + "nodeType": "YulIdentifier", + "src": "5233:9:84" + }, + { + "kind": "number", + "nativeSrc": "5244:2:84", + "nodeType": "YulLiteral", + "src": "5244:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5229:3:84", + "nodeType": "YulIdentifier", + "src": "5229:3:84" + }, + "nativeSrc": "5229:18:84", + "nodeType": "YulFunctionCall", + "src": "5229:18:84" + }, + { + "kind": "number", + "nativeSrc": "5249:2:84", + "nodeType": "YulLiteral", + "src": "5249:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5222:6:84", + "nodeType": "YulIdentifier", + "src": "5222:6:84" + }, + "nativeSrc": "5222:30:84", + "nodeType": "YulFunctionCall", + "src": "5222:30:84" + }, + "nativeSrc": "5222:30:84", + "nodeType": "YulExpressionStatement", + "src": "5222:30:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5272:9:84", + "nodeType": "YulIdentifier", + "src": "5272:9:84" + }, + { + "kind": "number", + "nativeSrc": "5283:2:84", + "nodeType": "YulLiteral", + "src": "5283:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5268:3:84", + "nodeType": "YulIdentifier", + "src": "5268:3:84" + }, + "nativeSrc": "5268:18:84", + "nodeType": "YulFunctionCall", + "src": "5268:18:84" + }, + { + "name": "value3", + "nativeSrc": "5288:6:84", + "nodeType": "YulIdentifier", + "src": "5288:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5261:6:84", + "nodeType": "YulIdentifier", + "src": "5261:6:84" + }, + "nativeSrc": "5261:34:84", + "nodeType": "YulFunctionCall", + "src": "5261:34:84" + }, + "nativeSrc": "5261:34:84", + "nodeType": "YulExpressionStatement", + "src": "5261:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5321:9:84", + "nodeType": "YulIdentifier", + "src": "5321:9:84" + }, + { + "kind": "number", + "nativeSrc": "5332:3:84", + "nodeType": "YulLiteral", + "src": "5332:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5317:3:84", + "nodeType": "YulIdentifier", + "src": "5317:3:84" + }, + "nativeSrc": "5317:19:84", + "nodeType": "YulFunctionCall", + "src": "5317:19:84" + }, + { + "name": "value2", + "nativeSrc": "5338:6:84", + "nodeType": "YulIdentifier", + "src": "5338:6:84" + }, + { + "name": "value3", + "nativeSrc": "5346:6:84", + "nodeType": "YulIdentifier", + "src": "5346:6:84" + } + ], + "functionName": { + "name": "calldatacopy", + "nativeSrc": "5304:12:84", + "nodeType": "YulIdentifier", + "src": "5304:12:84" + }, + "nativeSrc": "5304:49:84", + "nodeType": "YulFunctionCall", + "src": "5304:49:84" + }, + "nativeSrc": "5304:49:84", + "nodeType": "YulExpressionStatement", + "src": "5304:49:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5377:9:84", + "nodeType": "YulIdentifier", + "src": "5377:9:84" + }, + { + "name": "value3", + "nativeSrc": "5388:6:84", + "nodeType": "YulIdentifier", + "src": "5388:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5373:3:84", + "nodeType": "YulIdentifier", + "src": "5373:3:84" + }, + "nativeSrc": "5373:22:84", + "nodeType": "YulFunctionCall", + "src": "5373:22:84" + }, + { + "kind": "number", + "nativeSrc": "5397:3:84", + "nodeType": "YulLiteral", + "src": "5397:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5369:3:84", + "nodeType": "YulIdentifier", + "src": "5369:3:84" + }, + "nativeSrc": "5369:32:84", + "nodeType": "YulFunctionCall", + "src": "5369:32:84" + }, + { + "kind": "number", + "nativeSrc": "5403:1:84", + "nodeType": "YulLiteral", + "src": "5403:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5362:6:84", + "nodeType": "YulIdentifier", + "src": "5362:6:84" + }, + "nativeSrc": "5362:43:84", + "nodeType": "YulFunctionCall", + "src": "5362:43:84" + }, + "nativeSrc": "5362:43:84", + "nodeType": "YulExpressionStatement", + "src": "5362:43:84" + }, + { + "nativeSrc": "5414:63:84", + "nodeType": "YulAssignment", + "src": "5414:63:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5430:9:84", + "nodeType": "YulIdentifier", + "src": "5430:9:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value3", + "nativeSrc": "5449:6:84", + "nodeType": "YulIdentifier", + "src": "5449:6:84" + }, + { + "kind": "number", + "nativeSrc": "5457:2:84", + "nodeType": "YulLiteral", + "src": "5457:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5445:3:84", + "nodeType": "YulIdentifier", + "src": "5445:3:84" + }, + "nativeSrc": "5445:15:84", + "nodeType": "YulFunctionCall", + "src": "5445:15:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5466:2:84", + "nodeType": "YulLiteral", + "src": "5466:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "5462:3:84", + "nodeType": "YulIdentifier", + "src": "5462:3:84" + }, + "nativeSrc": "5462:7:84", + "nodeType": "YulFunctionCall", + "src": "5462:7:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5441:3:84", + "nodeType": "YulIdentifier", + "src": "5441:3:84" + }, + "nativeSrc": "5441:29:84", + "nodeType": "YulFunctionCall", + "src": "5441:29:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5426:3:84", + "nodeType": "YulIdentifier", + "src": "5426:3:84" + }, + "nativeSrc": "5426:45:84", + "nodeType": "YulFunctionCall", + "src": "5426:45:84" + }, + { + "kind": "number", + "nativeSrc": "5473:3:84", + "nodeType": "YulLiteral", + "src": "5473:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5422:3:84", + "nodeType": "YulIdentifier", + "src": "5422:3:84" + }, + "nativeSrc": "5422:55:84", + "nodeType": "YulFunctionCall", + "src": "5422:55:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "5414:4:84", + "nodeType": "YulIdentifier", + "src": "5414:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_uint48_t_uint48_t_bytes_calldata_ptr__to_t_uint48_t_uint48_t_bytes_memory_ptr__fromStack_reversed", + "nativeSrc": "4903:580:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5029:9:84", + "nodeType": "YulTypedName", + "src": "5029:9:84", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "5040:6:84", + "nodeType": "YulTypedName", + "src": "5040:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "5048:6:84", + "nodeType": "YulTypedName", + "src": "5048:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "5056:6:84", + "nodeType": "YulTypedName", + "src": "5056:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "5064:6:84", + "nodeType": "YulTypedName", + "src": "5064:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5075:4:84", + "nodeType": "YulTypedName", + "src": "5075:4:84", + "type": "" + } + ], + "src": "4903:580:84" + }, + { + "body": { + "nativeSrc": "5609:102:84", + "nodeType": "YulBlock", + "src": "5609:102:84", + "statements": [ + { + "nativeSrc": "5619:26:84", + "nodeType": "YulAssignment", + "src": "5619:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5631:9:84", + "nodeType": "YulIdentifier", + "src": "5631:9:84" + }, + { + "kind": "number", + "nativeSrc": "5642:2:84", + "nodeType": "YulLiteral", + "src": "5642:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5627:3:84", + "nodeType": "YulIdentifier", + "src": "5627:3:84" + }, + "nativeSrc": "5627:18:84", + "nodeType": "YulFunctionCall", + "src": "5627:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "5619:4:84", + "nodeType": "YulIdentifier", + "src": "5619:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5661:9:84", + "nodeType": "YulIdentifier", + "src": "5661:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "5676:6:84", + "nodeType": "YulIdentifier", + "src": "5676:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5692:3:84", + "nodeType": "YulLiteral", + "src": "5692:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "5697:1:84", + "nodeType": "YulLiteral", + "src": "5697:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "5688:3:84", + "nodeType": "YulIdentifier", + "src": "5688:3:84" + }, + "nativeSrc": "5688:11:84", + "nodeType": "YulFunctionCall", + "src": "5688:11:84" + }, + { + "kind": "number", + "nativeSrc": "5701:1:84", + "nodeType": "YulLiteral", + "src": "5701:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5684:3:84", + "nodeType": "YulIdentifier", + "src": "5684:3:84" + }, + "nativeSrc": "5684:19:84", + "nodeType": "YulFunctionCall", + "src": "5684:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5672:3:84", + "nodeType": "YulIdentifier", + "src": "5672:3:84" + }, + "nativeSrc": "5672:32:84", + "nodeType": "YulFunctionCall", + "src": "5672:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5654:6:84", + "nodeType": "YulIdentifier", + "src": "5654:6:84" + }, + "nativeSrc": "5654:51:84", + "nodeType": "YulFunctionCall", + "src": "5654:51:84" + }, + "nativeSrc": "5654:51:84", + "nodeType": "YulExpressionStatement", + "src": "5654:51:84" + } + ] + }, + "name": "abi_encode_tuple_t_contract$_IEntryPoint_$7000__to_t_address__fromStack_reversed", + "nativeSrc": "5488:223:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5578:9:84", + "nodeType": "YulTypedName", + "src": "5578:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "5589:6:84", + "nodeType": "YulTypedName", + "src": "5589:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5600:4:84", + "nodeType": "YulTypedName", + "src": "5600:4:84", + "type": "" + } + ], + "src": "5488:223:84" + }, + { + "body": { + "nativeSrc": "5794:185:84", + "nodeType": "YulBlock", + "src": "5794:185:84", + "statements": [ + { + "body": { + "nativeSrc": "5840:16:84", + "nodeType": "YulBlock", + "src": "5840:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5849:1:84", + "nodeType": "YulLiteral", + "src": "5849:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5852:1:84", + "nodeType": "YulLiteral", + "src": "5852:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5842:6:84", + "nodeType": "YulIdentifier", + "src": "5842:6:84" + }, + "nativeSrc": "5842:12:84", + "nodeType": "YulFunctionCall", + "src": "5842:12:84" + }, + "nativeSrc": "5842:12:84", + "nodeType": "YulExpressionStatement", + "src": "5842:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "5815:7:84", + "nodeType": "YulIdentifier", + "src": "5815:7:84" + }, + { + "name": "headStart", + "nativeSrc": "5824:9:84", + "nodeType": "YulIdentifier", + "src": "5824:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5811:3:84", + "nodeType": "YulIdentifier", + "src": "5811:3:84" + }, + "nativeSrc": "5811:23:84", + "nodeType": "YulFunctionCall", + "src": "5811:23:84" + }, + { + "kind": "number", + "nativeSrc": "5836:2:84", + "nodeType": "YulLiteral", + "src": "5836:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "5807:3:84", + "nodeType": "YulIdentifier", + "src": "5807:3:84" + }, + "nativeSrc": "5807:32:84", + "nodeType": "YulFunctionCall", + "src": "5807:32:84" + }, + "nativeSrc": "5804:52:84", + "nodeType": "YulIf", + "src": "5804:52:84" + }, + { + "nativeSrc": "5865:36:84", + "nodeType": "YulVariableDeclaration", + "src": "5865:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5891:9:84", + "nodeType": "YulIdentifier", + "src": "5891:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "5878:12:84", + "nodeType": "YulIdentifier", + "src": "5878:12:84" + }, + "nativeSrc": "5878:23:84", + "nodeType": "YulFunctionCall", + "src": "5878:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "5869:5:84", + "nodeType": "YulTypedName", + "src": "5869:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "5943:5:84", + "nodeType": "YulIdentifier", + "src": "5943:5:84" + } + ], + "functionName": { + "name": "validator_revert_address_payable", + "nativeSrc": "5910:32:84", + "nodeType": "YulIdentifier", + "src": "5910:32:84" + }, + "nativeSrc": "5910:39:84", + "nodeType": "YulFunctionCall", + "src": "5910:39:84" + }, + "nativeSrc": "5910:39:84", + "nodeType": "YulExpressionStatement", + "src": "5910:39:84" + }, + { + "nativeSrc": "5958:15:84", + "nodeType": "YulAssignment", + "src": "5958:15:84", + "value": { + "name": "value", + "nativeSrc": "5968:5:84", + "nodeType": "YulIdentifier", + "src": "5968:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "5958:6:84", + "nodeType": "YulIdentifier", + "src": "5958:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address_payable", + "nativeSrc": "5716:263:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5760:9:84", + "nodeType": "YulTypedName", + "src": "5760:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "5771:7:84", + "nodeType": "YulTypedName", + "src": "5771:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "5783:6:84", + "nodeType": "YulTypedName", + "src": "5783:6:84", + "type": "" + } + ], + "src": "5716:263:84" + }, + { + "body": { + "nativeSrc": "6085:76:84", + "nodeType": "YulBlock", + "src": "6085:76:84", + "statements": [ + { + "nativeSrc": "6095:26:84", + "nodeType": "YulAssignment", + "src": "6095:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6107:9:84", + "nodeType": "YulIdentifier", + "src": "6107:9:84" + }, + { + "kind": "number", + "nativeSrc": "6118:2:84", + "nodeType": "YulLiteral", + "src": "6118:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6103:3:84", + "nodeType": "YulIdentifier", + "src": "6103:3:84" + }, + "nativeSrc": "6103:18:84", + "nodeType": "YulFunctionCall", + "src": "6103:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6095:4:84", + "nodeType": "YulIdentifier", + "src": "6095:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6137:9:84", + "nodeType": "YulIdentifier", + "src": "6137:9:84" + }, + { + "name": "value0", + "nativeSrc": "6148:6:84", + "nodeType": "YulIdentifier", + "src": "6148:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6130:6:84", + "nodeType": "YulIdentifier", + "src": "6130:6:84" + }, + "nativeSrc": "6130:25:84", + "nodeType": "YulFunctionCall", + "src": "6130:25:84" + }, + "nativeSrc": "6130:25:84", + "nodeType": "YulExpressionStatement", + "src": "6130:25:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nativeSrc": "5984:177:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6054:9:84", + "nodeType": "YulTypedName", + "src": "6054:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "6065:6:84", + "nodeType": "YulTypedName", + "src": "6065:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6076:4:84", + "nodeType": "YulTypedName", + "src": "6076:4:84", + "type": "" + } + ], + "src": "5984:177:84" + }, + { + "body": { + "nativeSrc": "6265:93:84", + "nodeType": "YulBlock", + "src": "6265:93:84", + "statements": [ + { + "nativeSrc": "6275:26:84", + "nodeType": "YulAssignment", + "src": "6275:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6287:9:84", + "nodeType": "YulIdentifier", + "src": "6287:9:84" + }, + { + "kind": "number", + "nativeSrc": "6298:2:84", + "nodeType": "YulLiteral", + "src": "6298:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6283:3:84", + "nodeType": "YulIdentifier", + "src": "6283:3:84" + }, + "nativeSrc": "6283:18:84", + "nodeType": "YulFunctionCall", + "src": "6283:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6275:4:84", + "nodeType": "YulIdentifier", + "src": "6275:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6317:9:84", + "nodeType": "YulIdentifier", + "src": "6317:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "6332:6:84", + "nodeType": "YulIdentifier", + "src": "6332:6:84" + }, + { + "kind": "number", + "nativeSrc": "6340:10:84", + "nodeType": "YulLiteral", + "src": "6340:10:84", + "type": "", + "value": "0xffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6328:3:84", + "nodeType": "YulIdentifier", + "src": "6328:3:84" + }, + "nativeSrc": "6328:23:84", + "nodeType": "YulFunctionCall", + "src": "6328:23:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6310:6:84", + "nodeType": "YulIdentifier", + "src": "6310:6:84" + }, + "nativeSrc": "6310:42:84", + "nodeType": "YulFunctionCall", + "src": "6310:42:84" + }, + "nativeSrc": "6310:42:84", + "nodeType": "YulExpressionStatement", + "src": "6310:42:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint32__to_t_uint32__fromStack_reversed", + "nativeSrc": "6166:192:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6234:9:84", + "nodeType": "YulTypedName", + "src": "6234:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "6245:6:84", + "nodeType": "YulTypedName", + "src": "6245:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6256:4:84", + "nodeType": "YulTypedName", + "src": "6256:4:84", + "type": "" + } + ], + "src": "6166:192:84" + }, + { + "body": { + "nativeSrc": "6508:145:84", + "nodeType": "YulBlock", + "src": "6508:145:84", + "statements": [ + { + "nativeSrc": "6518:26:84", + "nodeType": "YulAssignment", + "src": "6518:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6530:9:84", + "nodeType": "YulIdentifier", + "src": "6530:9:84" + }, + { + "kind": "number", + "nativeSrc": "6541:2:84", + "nodeType": "YulLiteral", + "src": "6541:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6526:3:84", + "nodeType": "YulIdentifier", + "src": "6526:3:84" + }, + "nativeSrc": "6526:18:84", + "nodeType": "YulFunctionCall", + "src": "6526:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6518:4:84", + "nodeType": "YulIdentifier", + "src": "6518:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6560:9:84", + "nodeType": "YulIdentifier", + "src": "6560:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "6575:6:84", + "nodeType": "YulIdentifier", + "src": "6575:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6591:3:84", + "nodeType": "YulLiteral", + "src": "6591:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "6596:1:84", + "nodeType": "YulLiteral", + "src": "6596:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "6587:3:84", + "nodeType": "YulIdentifier", + "src": "6587:3:84" + }, + "nativeSrc": "6587:11:84", + "nodeType": "YulFunctionCall", + "src": "6587:11:84" + }, + { + "kind": "number", + "nativeSrc": "6600:1:84", + "nodeType": "YulLiteral", + "src": "6600:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "6583:3:84", + "nodeType": "YulIdentifier", + "src": "6583:3:84" + }, + "nativeSrc": "6583:19:84", + "nodeType": "YulFunctionCall", + "src": "6583:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6571:3:84", + "nodeType": "YulIdentifier", + "src": "6571:3:84" + }, + "nativeSrc": "6571:32:84", + "nodeType": "YulFunctionCall", + "src": "6571:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6553:6:84", + "nodeType": "YulIdentifier", + "src": "6553:6:84" + }, + "nativeSrc": "6553:51:84", + "nodeType": "YulFunctionCall", + "src": "6553:51:84" + }, + "nativeSrc": "6553:51:84", + "nodeType": "YulExpressionStatement", + "src": "6553:51:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6624:9:84", + "nodeType": "YulIdentifier", + "src": "6624:9:84" + }, + { + "kind": "number", + "nativeSrc": "6635:2:84", + "nodeType": "YulLiteral", + "src": "6635:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6620:3:84", + "nodeType": "YulIdentifier", + "src": "6620:3:84" + }, + "nativeSrc": "6620:18:84", + "nodeType": "YulFunctionCall", + "src": "6620:18:84" + }, + { + "name": "value1", + "nativeSrc": "6640:6:84", + "nodeType": "YulIdentifier", + "src": "6640:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6613:6:84", + "nodeType": "YulIdentifier", + "src": "6613:6:84" + }, + "nativeSrc": "6613:34:84", + "nodeType": "YulFunctionCall", + "src": "6613:34:84" + }, + "nativeSrc": "6613:34:84", + "nodeType": "YulExpressionStatement", + "src": "6613:34:84" + } + ] + }, + "name": "abi_encode_tuple_t_address_payable_t_uint256__to_t_address_payable_t_uint256__fromStack_reversed", + "nativeSrc": "6363:290:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6469:9:84", + "nodeType": "YulTypedName", + "src": "6469:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "6480:6:84", + "nodeType": "YulTypedName", + "src": "6480:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "6488:6:84", + "nodeType": "YulTypedName", + "src": "6488:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6499:4:84", + "nodeType": "YulTypedName", + "src": "6499:4:84", + "type": "" + } + ], + "src": "6363:290:84" + }, + { + "body": { + "nativeSrc": "6752:427:84", + "nodeType": "YulBlock", + "src": "6752:427:84", + "statements": [ + { + "nativeSrc": "6762:51:84", + "nodeType": "YulVariableDeclaration", + "src": "6762:51:84", + "value": { + "arguments": [ + { + "name": "ptr_to_tail", + "nativeSrc": "6801:11:84", + "nodeType": "YulIdentifier", + "src": "6801:11:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "6788:12:84", + "nodeType": "YulIdentifier", + "src": "6788:12:84" + }, + "nativeSrc": "6788:25:84", + "nodeType": "YulFunctionCall", + "src": "6788:25:84" + }, + "variables": [ + { + "name": "rel_offset_of_tail", + "nativeSrc": "6766:18:84", + "nodeType": "YulTypedName", + "src": "6766:18:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "6902:16:84", + "nodeType": "YulBlock", + "src": "6902:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6911:1:84", + "nodeType": "YulLiteral", + "src": "6911:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6914:1:84", + "nodeType": "YulLiteral", + "src": "6914:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6904:6:84", + "nodeType": "YulIdentifier", + "src": "6904:6:84" + }, + "nativeSrc": "6904:12:84", + "nodeType": "YulFunctionCall", + "src": "6904:12:84" + }, + "nativeSrc": "6904:12:84", + "nodeType": "YulExpressionStatement", + "src": "6904:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "rel_offset_of_tail", + "nativeSrc": "6836:18:84", + "nodeType": "YulIdentifier", + "src": "6836:18:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nativeSrc": "6864:12:84", + "nodeType": "YulIdentifier", + "src": "6864:12:84" + }, + "nativeSrc": "6864:14:84", + "nodeType": "YulFunctionCall", + "src": "6864:14:84" + }, + { + "name": "base_ref", + "nativeSrc": "6880:8:84", + "nodeType": "YulIdentifier", + "src": "6880:8:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "6860:3:84", + "nodeType": "YulIdentifier", + "src": "6860:3:84" + }, + "nativeSrc": "6860:29:84", + "nodeType": "YulFunctionCall", + "src": "6860:29:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6895:2:84", + "nodeType": "YulLiteral", + "src": "6895:2:84", + "type": "", + "value": "30" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "6891:3:84", + "nodeType": "YulIdentifier", + "src": "6891:3:84" + }, + "nativeSrc": "6891:7:84", + "nodeType": "YulFunctionCall", + "src": "6891:7:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6856:3:84", + "nodeType": "YulIdentifier", + "src": "6856:3:84" + }, + "nativeSrc": "6856:43:84", + "nodeType": "YulFunctionCall", + "src": "6856:43:84" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "6832:3:84", + "nodeType": "YulIdentifier", + "src": "6832:3:84" + }, + "nativeSrc": "6832:68:84", + "nodeType": "YulFunctionCall", + "src": "6832:68:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "6825:6:84", + "nodeType": "YulIdentifier", + "src": "6825:6:84" + }, + "nativeSrc": "6825:76:84", + "nodeType": "YulFunctionCall", + "src": "6825:76:84" + }, + "nativeSrc": "6822:96:84", + "nodeType": "YulIf", + "src": "6822:96:84" + }, + { + "nativeSrc": "6927:47:84", + "nodeType": "YulVariableDeclaration", + "src": "6927:47:84", + "value": { + "arguments": [ + { + "name": "base_ref", + "nativeSrc": "6945:8:84", + "nodeType": "YulIdentifier", + "src": "6945:8:84" + }, + { + "name": "rel_offset_of_tail", + "nativeSrc": "6955:18:84", + "nodeType": "YulIdentifier", + "src": "6955:18:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6941:3:84", + "nodeType": "YulIdentifier", + "src": "6941:3:84" + }, + "nativeSrc": "6941:33:84", + "nodeType": "YulFunctionCall", + "src": "6941:33:84" + }, + "variables": [ + { + "name": "addr_1", + "nativeSrc": "6931:6:84", + "nodeType": "YulTypedName", + "src": "6931:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "6983:30:84", + "nodeType": "YulAssignment", + "src": "6983:30:84", + "value": { + "arguments": [ + { + "name": "addr_1", + "nativeSrc": "7006:6:84", + "nodeType": "YulIdentifier", + "src": "7006:6:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "6993:12:84", + "nodeType": "YulIdentifier", + "src": "6993:12:84" + }, + "nativeSrc": "6993:20:84", + "nodeType": "YulFunctionCall", + "src": "6993:20:84" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "6983:6:84", + "nodeType": "YulIdentifier", + "src": "6983:6:84" + } + ] + }, + { + "body": { + "nativeSrc": "7056:16:84", + "nodeType": "YulBlock", + "src": "7056:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7065:1:84", + "nodeType": "YulLiteral", + "src": "7065:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "7068:1:84", + "nodeType": "YulLiteral", + "src": "7068:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "7058:6:84", + "nodeType": "YulIdentifier", + "src": "7058:6:84" + }, + "nativeSrc": "7058:12:84", + "nodeType": "YulFunctionCall", + "src": "7058:12:84" + }, + "nativeSrc": "7058:12:84", + "nodeType": "YulExpressionStatement", + "src": "7058:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nativeSrc": "7028:6:84", + "nodeType": "YulIdentifier", + "src": "7028:6:84" + }, + { + "kind": "number", + "nativeSrc": "7036:18:84", + "nodeType": "YulLiteral", + "src": "7036:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "7025:2:84", + "nodeType": "YulIdentifier", + "src": "7025:2:84" + }, + "nativeSrc": "7025:30:84", + "nodeType": "YulFunctionCall", + "src": "7025:30:84" + }, + "nativeSrc": "7022:50:84", + "nodeType": "YulIf", + "src": "7022:50:84" + }, + { + "nativeSrc": "7081:25:84", + "nodeType": "YulAssignment", + "src": "7081:25:84", + "value": { + "arguments": [ + { + "name": "addr_1", + "nativeSrc": "7093:6:84", + "nodeType": "YulIdentifier", + "src": "7093:6:84" + }, + { + "kind": "number", + "nativeSrc": "7101:4:84", + "nodeType": "YulLiteral", + "src": "7101:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7089:3:84", + "nodeType": "YulIdentifier", + "src": "7089:3:84" + }, + "nativeSrc": "7089:17:84", + "nodeType": "YulFunctionCall", + "src": "7089:17:84" + }, + "variableNames": [ + { + "name": "addr", + "nativeSrc": "7081:4:84", + "nodeType": "YulIdentifier", + "src": "7081:4:84" + } + ] + }, + { + "body": { + "nativeSrc": "7157:16:84", + "nodeType": "YulBlock", + "src": "7157:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7166:1:84", + "nodeType": "YulLiteral", + "src": "7166:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "7169:1:84", + "nodeType": "YulLiteral", + "src": "7169:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "7159:6:84", + "nodeType": "YulIdentifier", + "src": "7159:6:84" + }, + "nativeSrc": "7159:12:84", + "nodeType": "YulFunctionCall", + "src": "7159:12:84" + }, + "nativeSrc": "7159:12:84", + "nodeType": "YulExpressionStatement", + "src": "7159:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "addr", + "nativeSrc": "7122:4:84", + "nodeType": "YulIdentifier", + "src": "7122:4:84" + }, + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nativeSrc": "7132:12:84", + "nodeType": "YulIdentifier", + "src": "7132:12:84" + }, + "nativeSrc": "7132:14:84", + "nodeType": "YulFunctionCall", + "src": "7132:14:84" + }, + { + "name": "length", + "nativeSrc": "7148:6:84", + "nodeType": "YulIdentifier", + "src": "7148:6:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7128:3:84", + "nodeType": "YulIdentifier", + "src": "7128:3:84" + }, + "nativeSrc": "7128:27:84", + "nodeType": "YulFunctionCall", + "src": "7128:27:84" + } + ], + "functionName": { + "name": "sgt", + "nativeSrc": "7118:3:84", + "nodeType": "YulIdentifier", + "src": "7118:3:84" + }, + "nativeSrc": "7118:38:84", + "nodeType": "YulFunctionCall", + "src": "7118:38:84" + }, + "nativeSrc": "7115:58:84", + "nodeType": "YulIf", + "src": "7115:58:84" + } + ] + }, + "name": "access_calldata_tail_t_bytes_calldata_ptr", + "nativeSrc": "6658:521:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "base_ref", + "nativeSrc": "6709:8:84", + "nodeType": "YulTypedName", + "src": "6709:8:84", + "type": "" + }, + { + "name": "ptr_to_tail", + "nativeSrc": "6719:11:84", + "nodeType": "YulTypedName", + "src": "6719:11:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "addr", + "nativeSrc": "6735:4:84", + "nodeType": "YulTypedName", + "src": "6735:4:84", + "type": "" + }, + { + "name": "length", + "nativeSrc": "6741:6:84", + "nodeType": "YulTypedName", + "src": "6741:6:84", + "type": "" + } + ], + "src": "6658:521:84" + }, + { + "body": { + "nativeSrc": "7331:124:84", + "nodeType": "YulBlock", + "src": "7331:124:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "7354:3:84", + "nodeType": "YulIdentifier", + "src": "7354:3:84" + }, + { + "name": "value0", + "nativeSrc": "7359:6:84", + "nodeType": "YulIdentifier", + "src": "7359:6:84" + }, + { + "name": "value1", + "nativeSrc": "7367:6:84", + "nodeType": "YulIdentifier", + "src": "7367:6:84" + } + ], + "functionName": { + "name": "calldatacopy", + "nativeSrc": "7341:12:84", + "nodeType": "YulIdentifier", + "src": "7341:12:84" + }, + "nativeSrc": "7341:33:84", + "nodeType": "YulFunctionCall", + "src": "7341:33:84" + }, + "nativeSrc": "7341:33:84", + "nodeType": "YulExpressionStatement", + "src": "7341:33:84" + }, + { + "nativeSrc": "7383:26:84", + "nodeType": "YulVariableDeclaration", + "src": "7383:26:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "7397:3:84", + "nodeType": "YulIdentifier", + "src": "7397:3:84" + }, + { + "name": "value1", + "nativeSrc": "7402:6:84", + "nodeType": "YulIdentifier", + "src": "7402:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7393:3:84", + "nodeType": "YulIdentifier", + "src": "7393:3:84" + }, + "nativeSrc": "7393:16:84", + "nodeType": "YulFunctionCall", + "src": "7393:16:84" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "7387:2:84", + "nodeType": "YulTypedName", + "src": "7387:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "7425:2:84", + "nodeType": "YulIdentifier", + "src": "7425:2:84" + }, + { + "kind": "number", + "nativeSrc": "7429:1:84", + "nodeType": "YulLiteral", + "src": "7429:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7418:6:84", + "nodeType": "YulIdentifier", + "src": "7418:6:84" + }, + "nativeSrc": "7418:13:84", + "nodeType": "YulFunctionCall", + "src": "7418:13:84" + }, + "nativeSrc": "7418:13:84", + "nodeType": "YulExpressionStatement", + "src": "7418:13:84" + }, + { + "nativeSrc": "7440:9:84", + "nodeType": "YulAssignment", + "src": "7440:9:84", + "value": { + "name": "_1", + "nativeSrc": "7447:2:84", + "nodeType": "YulIdentifier", + "src": "7447:2:84" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "7440:3:84", + "nodeType": "YulIdentifier", + "src": "7440:3:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes_calldata_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "7184:271:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "7299:3:84", + "nodeType": "YulTypedName", + "src": "7299:3:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "7304:6:84", + "nodeType": "YulTypedName", + "src": "7304:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "7312:6:84", + "nodeType": "YulTypedName", + "src": "7312:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "7323:3:84", + "nodeType": "YulTypedName", + "src": "7323:3:84", + "type": "" + } + ], + "src": "7184:271:84" + }, + { + "body": { + "nativeSrc": "7590:201:84", + "nodeType": "YulBlock", + "src": "7590:201:84", + "statements": [ + { + "body": { + "nativeSrc": "7628:16:84", + "nodeType": "YulBlock", + "src": "7628:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7637:1:84", + "nodeType": "YulLiteral", + "src": "7637:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "7640:1:84", + "nodeType": "YulLiteral", + "src": "7640:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "7630:6:84", + "nodeType": "YulIdentifier", + "src": "7630:6:84" + }, + "nativeSrc": "7630:12:84", + "nodeType": "YulFunctionCall", + "src": "7630:12:84" + }, + "nativeSrc": "7630:12:84", + "nodeType": "YulExpressionStatement", + "src": "7630:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "startIndex", + "nativeSrc": "7606:10:84", + "nodeType": "YulIdentifier", + "src": "7606:10:84" + }, + { + "name": "endIndex", + "nativeSrc": "7618:8:84", + "nodeType": "YulIdentifier", + "src": "7618:8:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "7603:2:84", + "nodeType": "YulIdentifier", + "src": "7603:2:84" + }, + "nativeSrc": "7603:24:84", + "nodeType": "YulFunctionCall", + "src": "7603:24:84" + }, + "nativeSrc": "7600:44:84", + "nodeType": "YulIf", + "src": "7600:44:84" + }, + { + "body": { + "nativeSrc": "7677:16:84", + "nodeType": "YulBlock", + "src": "7677:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7686:1:84", + "nodeType": "YulLiteral", + "src": "7686:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "7689:1:84", + "nodeType": "YulLiteral", + "src": "7689:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "7679:6:84", + "nodeType": "YulIdentifier", + "src": "7679:6:84" + }, + "nativeSrc": "7679:12:84", + "nodeType": "YulFunctionCall", + "src": "7679:12:84" + }, + "nativeSrc": "7679:12:84", + "nodeType": "YulExpressionStatement", + "src": "7679:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "endIndex", + "nativeSrc": "7659:8:84", + "nodeType": "YulIdentifier", + "src": "7659:8:84" + }, + { + "name": "length", + "nativeSrc": "7669:6:84", + "nodeType": "YulIdentifier", + "src": "7669:6:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "7656:2:84", + "nodeType": "YulIdentifier", + "src": "7656:2:84" + }, + "nativeSrc": "7656:20:84", + "nodeType": "YulFunctionCall", + "src": "7656:20:84" + }, + "nativeSrc": "7653:40:84", + "nodeType": "YulIf", + "src": "7653:40:84" + }, + { + "nativeSrc": "7702:36:84", + "nodeType": "YulAssignment", + "src": "7702:36:84", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "7719:6:84", + "nodeType": "YulIdentifier", + "src": "7719:6:84" + }, + { + "name": "startIndex", + "nativeSrc": "7727:10:84", + "nodeType": "YulIdentifier", + "src": "7727:10:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7715:3:84", + "nodeType": "YulIdentifier", + "src": "7715:3:84" + }, + "nativeSrc": "7715:23:84", + "nodeType": "YulFunctionCall", + "src": "7715:23:84" + }, + "variableNames": [ + { + "name": "offsetOut", + "nativeSrc": "7702:9:84", + "nodeType": "YulIdentifier", + "src": "7702:9:84" + } + ] + }, + { + "nativeSrc": "7747:38:84", + "nodeType": "YulAssignment", + "src": "7747:38:84", + "value": { + "arguments": [ + { + "name": "endIndex", + "nativeSrc": "7764:8:84", + "nodeType": "YulIdentifier", + "src": "7764:8:84" + }, + { + "name": "startIndex", + "nativeSrc": "7774:10:84", + "nodeType": "YulIdentifier", + "src": "7774:10:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7760:3:84", + "nodeType": "YulIdentifier", + "src": "7760:3:84" + }, + "nativeSrc": "7760:25:84", + "nodeType": "YulFunctionCall", + "src": "7760:25:84" + }, + "variableNames": [ + { + "name": "lengthOut", + "nativeSrc": "7747:9:84", + "nodeType": "YulIdentifier", + "src": "7747:9:84" + } + ] + } + ] + }, + "name": "calldata_array_index_range_access_t_bytes_calldata_ptr", + "nativeSrc": "7460:331:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "7524:6:84", + "nodeType": "YulTypedName", + "src": "7524:6:84", + "type": "" + }, + { + "name": "length", + "nativeSrc": "7532:6:84", + "nodeType": "YulTypedName", + "src": "7532:6:84", + "type": "" + }, + { + "name": "startIndex", + "nativeSrc": "7540:10:84", + "nodeType": "YulTypedName", + "src": "7540:10:84", + "type": "" + }, + { + "name": "endIndex", + "nativeSrc": "7552:8:84", + "nodeType": "YulTypedName", + "src": "7552:8:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "offsetOut", + "nativeSrc": "7565:9:84", + "nodeType": "YulTypedName", + "src": "7565:9:84", + "type": "" + }, + { + "name": "lengthOut", + "nativeSrc": "7576:9:84", + "nodeType": "YulTypedName", + "src": "7576:9:84", + "type": "" + } + ], + "src": "7460:331:84" + }, + { + "body": { + "nativeSrc": "7897:154:84", + "nodeType": "YulBlock", + "src": "7897:154:84", + "statements": [ + { + "nativeSrc": "7907:28:84", + "nodeType": "YulAssignment", + "src": "7907:28:84", + "value": { + "arguments": [ + { + "name": "array", + "nativeSrc": "7929:5:84", + "nodeType": "YulIdentifier", + "src": "7929:5:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "7916:12:84", + "nodeType": "YulIdentifier", + "src": "7916:12:84" + }, + "nativeSrc": "7916:19:84", + "nodeType": "YulFunctionCall", + "src": "7916:19:84" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "7907:5:84", + "nodeType": "YulIdentifier", + "src": "7907:5:84" + } + ] + }, + { + "body": { + "nativeSrc": "7967:78:84", + "nodeType": "YulBlock", + "src": "7967:78:84", + "statements": [ + { + "nativeSrc": "7981:54:84", + "nodeType": "YulAssignment", + "src": "7981:54:84", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "7994:5:84", + "nodeType": "YulIdentifier", + "src": "7994:5:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8009:1:84", + "nodeType": "YulLiteral", + "src": "8009:1:84", + "type": "", + "value": "3" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8016:2:84", + "nodeType": "YulLiteral", + "src": "8016:2:84", + "type": "", + "value": "32" + }, + { + "name": "len", + "nativeSrc": "8020:3:84", + "nodeType": "YulIdentifier", + "src": "8020:3:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8012:3:84", + "nodeType": "YulIdentifier", + "src": "8012:3:84" + }, + "nativeSrc": "8012:12:84", + "nodeType": "YulFunctionCall", + "src": "8012:12:84" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8005:3:84", + "nodeType": "YulIdentifier", + "src": "8005:3:84" + }, + "nativeSrc": "8005:20:84", + "nodeType": "YulFunctionCall", + "src": "8005:20:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8031:1:84", + "nodeType": "YulLiteral", + "src": "8031:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "8027:3:84", + "nodeType": "YulIdentifier", + "src": "8027:3:84" + }, + "nativeSrc": "8027:6:84", + "nodeType": "YulFunctionCall", + "src": "8027:6:84" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8001:3:84", + "nodeType": "YulIdentifier", + "src": "8001:3:84" + }, + "nativeSrc": "8001:33:84", + "nodeType": "YulFunctionCall", + "src": "8001:33:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7990:3:84", + "nodeType": "YulIdentifier", + "src": "7990:3:84" + }, + "nativeSrc": "7990:45:84", + "nodeType": "YulFunctionCall", + "src": "7990:45:84" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "7981:5:84", + "nodeType": "YulIdentifier", + "src": "7981:5:84" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "len", + "nativeSrc": "7950:3:84", + "nodeType": "YulIdentifier", + "src": "7950:3:84" + }, + { + "kind": "number", + "nativeSrc": "7955:2:84", + "nodeType": "YulLiteral", + "src": "7955:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "7947:2:84", + "nodeType": "YulIdentifier", + "src": "7947:2:84" + }, + "nativeSrc": "7947:11:84", + "nodeType": "YulFunctionCall", + "src": "7947:11:84" + }, + "nativeSrc": "7944:101:84", + "nodeType": "YulIf", + "src": "7944:101:84" + } + ] + }, + "name": "convert_bytes_to_fixedbytes_from_t_bytes_calldata_ptr_to_t_bytes32", + "nativeSrc": "7796:255:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "array", + "nativeSrc": "7872:5:84", + "nodeType": "YulTypedName", + "src": "7872:5:84", + "type": "" + }, + { + "name": "len", + "nativeSrc": "7879:3:84", + "nodeType": "YulTypedName", + "src": "7879:3:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nativeSrc": "7887:5:84", + "nodeType": "YulTypedName", + "src": "7887:5:84", + "type": "" + } + ], + "src": "7796:255:84" + }, + { + "body": { + "nativeSrc": "8463:667:84", + "nodeType": "YulBlock", + "src": "8463:667:84", + "statements": [ + { + "nativeSrc": "8473:27:84", + "nodeType": "YulAssignment", + "src": "8473:27:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8485:9:84", + "nodeType": "YulIdentifier", + "src": "8485:9:84" + }, + { + "kind": "number", + "nativeSrc": "8496:3:84", + "nodeType": "YulLiteral", + "src": "8496:3:84", + "type": "", + "value": "384" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8481:3:84", + "nodeType": "YulIdentifier", + "src": "8481:3:84" + }, + "nativeSrc": "8481:19:84", + "nodeType": "YulFunctionCall", + "src": "8481:19:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "8473:4:84", + "nodeType": "YulIdentifier", + "src": "8473:4:84" + } + ] + }, + { + "nativeSrc": "8509:29:84", + "nodeType": "YulVariableDeclaration", + "src": "8509:29:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8527:3:84", + "nodeType": "YulLiteral", + "src": "8527:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "8532:1:84", + "nodeType": "YulLiteral", + "src": "8532:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8523:3:84", + "nodeType": "YulIdentifier", + "src": "8523:3:84" + }, + "nativeSrc": "8523:11:84", + "nodeType": "YulFunctionCall", + "src": "8523:11:84" + }, + { + "kind": "number", + "nativeSrc": "8536:1:84", + "nodeType": "YulLiteral", + "src": "8536:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8519:3:84", + "nodeType": "YulIdentifier", + "src": "8519:3:84" + }, + "nativeSrc": "8519:19:84", + "nodeType": "YulFunctionCall", + "src": "8519:19:84" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "8513:2:84", + "nodeType": "YulTypedName", + "src": "8513:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8554:9:84", + "nodeType": "YulIdentifier", + "src": "8554:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "8569:6:84", + "nodeType": "YulIdentifier", + "src": "8569:6:84" + }, + { + "name": "_1", + "nativeSrc": "8577:2:84", + "nodeType": "YulIdentifier", + "src": "8577:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8565:3:84", + "nodeType": "YulIdentifier", + "src": "8565:3:84" + }, + "nativeSrc": "8565:15:84", + "nodeType": "YulFunctionCall", + "src": "8565:15:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8547:6:84", + "nodeType": "YulIdentifier", + "src": "8547:6:84" + }, + "nativeSrc": "8547:34:84", + "nodeType": "YulFunctionCall", + "src": "8547:34:84" + }, + "nativeSrc": "8547:34:84", + "nodeType": "YulExpressionStatement", + "src": "8547:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8601:9:84", + "nodeType": "YulIdentifier", + "src": "8601:9:84" + }, + { + "kind": "number", + "nativeSrc": "8612:2:84", + "nodeType": "YulLiteral", + "src": "8612:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8597:3:84", + "nodeType": "YulIdentifier", + "src": "8597:3:84" + }, + "nativeSrc": "8597:18:84", + "nodeType": "YulFunctionCall", + "src": "8597:18:84" + }, + { + "name": "value1", + "nativeSrc": "8617:6:84", + "nodeType": "YulIdentifier", + "src": "8617:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8590:6:84", + "nodeType": "YulIdentifier", + "src": "8590:6:84" + }, + "nativeSrc": "8590:34:84", + "nodeType": "YulFunctionCall", + "src": "8590:34:84" + }, + "nativeSrc": "8590:34:84", + "nodeType": "YulExpressionStatement", + "src": "8590:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8644:9:84", + "nodeType": "YulIdentifier", + "src": "8644:9:84" + }, + { + "kind": "number", + "nativeSrc": "8655:2:84", + "nodeType": "YulLiteral", + "src": "8655:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8640:3:84", + "nodeType": "YulIdentifier", + "src": "8640:3:84" + }, + "nativeSrc": "8640:18:84", + "nodeType": "YulFunctionCall", + "src": "8640:18:84" + }, + { + "name": "value2", + "nativeSrc": "8660:6:84", + "nodeType": "YulIdentifier", + "src": "8660:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8633:6:84", + "nodeType": "YulIdentifier", + "src": "8633:6:84" + }, + "nativeSrc": "8633:34:84", + "nodeType": "YulFunctionCall", + "src": "8633:34:84" + }, + "nativeSrc": "8633:34:84", + "nodeType": "YulExpressionStatement", + "src": "8633:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8687:9:84", + "nodeType": "YulIdentifier", + "src": "8687:9:84" + }, + { + "kind": "number", + "nativeSrc": "8698:2:84", + "nodeType": "YulLiteral", + "src": "8698:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8683:3:84", + "nodeType": "YulIdentifier", + "src": "8683:3:84" + }, + "nativeSrc": "8683:18:84", + "nodeType": "YulFunctionCall", + "src": "8683:18:84" + }, + { + "name": "value3", + "nativeSrc": "8703:6:84", + "nodeType": "YulIdentifier", + "src": "8703:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8676:6:84", + "nodeType": "YulIdentifier", + "src": "8676:6:84" + }, + "nativeSrc": "8676:34:84", + "nodeType": "YulFunctionCall", + "src": "8676:34:84" + }, + "nativeSrc": "8676:34:84", + "nodeType": "YulExpressionStatement", + "src": "8676:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8730:9:84", + "nodeType": "YulIdentifier", + "src": "8730:9:84" + }, + { + "kind": "number", + "nativeSrc": "8741:3:84", + "nodeType": "YulLiteral", + "src": "8741:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8726:3:84", + "nodeType": "YulIdentifier", + "src": "8726:3:84" + }, + "nativeSrc": "8726:19:84", + "nodeType": "YulFunctionCall", + "src": "8726:19:84" + }, + { + "name": "value4", + "nativeSrc": "8747:6:84", + "nodeType": "YulIdentifier", + "src": "8747:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8719:6:84", + "nodeType": "YulIdentifier", + "src": "8719:6:84" + }, + "nativeSrc": "8719:35:84", + "nodeType": "YulFunctionCall", + "src": "8719:35:84" + }, + "nativeSrc": "8719:35:84", + "nodeType": "YulExpressionStatement", + "src": "8719:35:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8774:9:84", + "nodeType": "YulIdentifier", + "src": "8774:9:84" + }, + { + "kind": "number", + "nativeSrc": "8785:3:84", + "nodeType": "YulLiteral", + "src": "8785:3:84", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8770:3:84", + "nodeType": "YulIdentifier", + "src": "8770:3:84" + }, + "nativeSrc": "8770:19:84", + "nodeType": "YulFunctionCall", + "src": "8770:19:84" + }, + { + "name": "value5", + "nativeSrc": "8791:6:84", + "nodeType": "YulIdentifier", + "src": "8791:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8763:6:84", + "nodeType": "YulIdentifier", + "src": "8763:6:84" + }, + "nativeSrc": "8763:35:84", + "nodeType": "YulFunctionCall", + "src": "8763:35:84" + }, + "nativeSrc": "8763:35:84", + "nodeType": "YulExpressionStatement", + "src": "8763:35:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8818:9:84", + "nodeType": "YulIdentifier", + "src": "8818:9:84" + }, + { + "kind": "number", + "nativeSrc": "8829:3:84", + "nodeType": "YulLiteral", + "src": "8829:3:84", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8814:3:84", + "nodeType": "YulIdentifier", + "src": "8814:3:84" + }, + "nativeSrc": "8814:19:84", + "nodeType": "YulFunctionCall", + "src": "8814:19:84" + }, + { + "name": "value6", + "nativeSrc": "8835:6:84", + "nodeType": "YulIdentifier", + "src": "8835:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8807:6:84", + "nodeType": "YulIdentifier", + "src": "8807:6:84" + }, + "nativeSrc": "8807:35:84", + "nodeType": "YulFunctionCall", + "src": "8807:35:84" + }, + "nativeSrc": "8807:35:84", + "nodeType": "YulExpressionStatement", + "src": "8807:35:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8862:9:84", + "nodeType": "YulIdentifier", + "src": "8862:9:84" + }, + { + "kind": "number", + "nativeSrc": "8873:3:84", + "nodeType": "YulLiteral", + "src": "8873:3:84", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8858:3:84", + "nodeType": "YulIdentifier", + "src": "8858:3:84" + }, + "nativeSrc": "8858:19:84", + "nodeType": "YulFunctionCall", + "src": "8858:19:84" + }, + { + "name": "value7", + "nativeSrc": "8879:6:84", + "nodeType": "YulIdentifier", + "src": "8879:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8851:6:84", + "nodeType": "YulIdentifier", + "src": "8851:6:84" + }, + "nativeSrc": "8851:35:84", + "nodeType": "YulFunctionCall", + "src": "8851:35:84" + }, + "nativeSrc": "8851:35:84", + "nodeType": "YulExpressionStatement", + "src": "8851:35:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8906:9:84", + "nodeType": "YulIdentifier", + "src": "8906:9:84" + }, + { + "kind": "number", + "nativeSrc": "8917:3:84", + "nodeType": "YulLiteral", + "src": "8917:3:84", + "type": "", + "value": "256" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8902:3:84", + "nodeType": "YulIdentifier", + "src": "8902:3:84" + }, + "nativeSrc": "8902:19:84", + "nodeType": "YulFunctionCall", + "src": "8902:19:84" + }, + { + "name": "value8", + "nativeSrc": "8923:6:84", + "nodeType": "YulIdentifier", + "src": "8923:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8895:6:84", + "nodeType": "YulIdentifier", + "src": "8895:6:84" + }, + "nativeSrc": "8895:35:84", + "nodeType": "YulFunctionCall", + "src": "8895:35:84" + }, + "nativeSrc": "8895:35:84", + "nodeType": "YulExpressionStatement", + "src": "8895:35:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8950:9:84", + "nodeType": "YulIdentifier", + "src": "8950:9:84" + }, + { + "kind": "number", + "nativeSrc": "8961:3:84", + "nodeType": "YulLiteral", + "src": "8961:3:84", + "type": "", + "value": "288" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8946:3:84", + "nodeType": "YulIdentifier", + "src": "8946:3:84" + }, + "nativeSrc": "8946:19:84", + "nodeType": "YulFunctionCall", + "src": "8946:19:84" + }, + { + "arguments": [ + { + "name": "value9", + "nativeSrc": "8971:6:84", + "nodeType": "YulIdentifier", + "src": "8971:6:84" + }, + { + "name": "_1", + "nativeSrc": "8979:2:84", + "nodeType": "YulIdentifier", + "src": "8979:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8967:3:84", + "nodeType": "YulIdentifier", + "src": "8967:3:84" + }, + "nativeSrc": "8967:15:84", + "nodeType": "YulFunctionCall", + "src": "8967:15:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8939:6:84", + "nodeType": "YulIdentifier", + "src": "8939:6:84" + }, + "nativeSrc": "8939:44:84", + "nodeType": "YulFunctionCall", + "src": "8939:44:84" + }, + "nativeSrc": "8939:44:84", + "nodeType": "YulExpressionStatement", + "src": "8939:44:84" + }, + { + "nativeSrc": "8992:24:84", + "nodeType": "YulVariableDeclaration", + "src": "8992:24:84", + "value": { + "kind": "number", + "nativeSrc": "9002:14:84", + "nodeType": "YulLiteral", + "src": "9002:14:84", + "type": "", + "value": "0xffffffffffff" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "8996:2:84", + "nodeType": "YulTypedName", + "src": "8996:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9036:9:84", + "nodeType": "YulIdentifier", + "src": "9036:9:84" + }, + { + "kind": "number", + "nativeSrc": "9047:3:84", + "nodeType": "YulLiteral", + "src": "9047:3:84", + "type": "", + "value": "320" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9032:3:84", + "nodeType": "YulIdentifier", + "src": "9032:3:84" + }, + "nativeSrc": "9032:19:84", + "nodeType": "YulFunctionCall", + "src": "9032:19:84" + }, + { + "arguments": [ + { + "name": "value10", + "nativeSrc": "9057:7:84", + "nodeType": "YulIdentifier", + "src": "9057:7:84" + }, + { + "name": "_2", + "nativeSrc": "9066:2:84", + "nodeType": "YulIdentifier", + "src": "9066:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9053:3:84", + "nodeType": "YulIdentifier", + "src": "9053:3:84" + }, + "nativeSrc": "9053:16:84", + "nodeType": "YulFunctionCall", + "src": "9053:16:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9025:6:84", + "nodeType": "YulIdentifier", + "src": "9025:6:84" + }, + "nativeSrc": "9025:45:84", + "nodeType": "YulFunctionCall", + "src": "9025:45:84" + }, + "nativeSrc": "9025:45:84", + "nodeType": "YulExpressionStatement", + "src": "9025:45:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9090:9:84", + "nodeType": "YulIdentifier", + "src": "9090:9:84" + }, + { + "kind": "number", + "nativeSrc": "9101:3:84", + "nodeType": "YulLiteral", + "src": "9101:3:84", + "type": "", + "value": "352" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9086:3:84", + "nodeType": "YulIdentifier", + "src": "9086:3:84" + }, + "nativeSrc": "9086:19:84", + "nodeType": "YulFunctionCall", + "src": "9086:19:84" + }, + { + "arguments": [ + { + "name": "value11", + "nativeSrc": "9111:7:84", + "nodeType": "YulIdentifier", + "src": "9111:7:84" + }, + { + "name": "_2", + "nativeSrc": "9120:2:84", + "nodeType": "YulIdentifier", + "src": "9120:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9107:3:84", + "nodeType": "YulIdentifier", + "src": "9107:3:84" + }, + "nativeSrc": "9107:16:84", + "nodeType": "YulFunctionCall", + "src": "9107:16:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9079:6:84", + "nodeType": "YulIdentifier", + "src": "9079:6:84" + }, + "nativeSrc": "9079:45:84", + "nodeType": "YulFunctionCall", + "src": "9079:45:84" + }, + "nativeSrc": "9079:45:84", + "nodeType": "YulExpressionStatement", + "src": "9079:45:84" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_uint256_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_uint256_t_bytes32_t_uint256_t_address_t_uint48_t_uint48__to_t_address_t_uint256_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_uint256_t_bytes32_t_uint256_t_address_t_uint48_t_uint48__fromStack_reversed", + "nativeSrc": "8056:1074:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "8342:9:84", + "nodeType": "YulTypedName", + "src": "8342:9:84", + "type": "" + }, + { + "name": "value11", + "nativeSrc": "8353:7:84", + "nodeType": "YulTypedName", + "src": "8353:7:84", + "type": "" + }, + { + "name": "value10", + "nativeSrc": "8362:7:84", + "nodeType": "YulTypedName", + "src": "8362:7:84", + "type": "" + }, + { + "name": "value9", + "nativeSrc": "8371:6:84", + "nodeType": "YulTypedName", + "src": "8371:6:84", + "type": "" + }, + { + "name": "value8", + "nativeSrc": "8379:6:84", + "nodeType": "YulTypedName", + "src": "8379:6:84", + "type": "" + }, + { + "name": "value7", + "nativeSrc": "8387:6:84", + "nodeType": "YulTypedName", + "src": "8387:6:84", + "type": "" + }, + { + "name": "value6", + "nativeSrc": "8395:6:84", + "nodeType": "YulTypedName", + "src": "8395:6:84", + "type": "" + }, + { + "name": "value5", + "nativeSrc": "8403:6:84", + "nodeType": "YulTypedName", + "src": "8403:6:84", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "8411:6:84", + "nodeType": "YulTypedName", + "src": "8411:6:84", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "8419:6:84", + "nodeType": "YulTypedName", + "src": "8419:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "8427:6:84", + "nodeType": "YulTypedName", + "src": "8427:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "8435:6:84", + "nodeType": "YulTypedName", + "src": "8435:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "8443:6:84", + "nodeType": "YulTypedName", + "src": "8443:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "8454:4:84", + "nodeType": "YulTypedName", + "src": "8454:4:84", + "type": "" + } + ], + "src": "8056:1074:84" + }, + { + "body": { + "nativeSrc": "9220:171:84", + "nodeType": "YulBlock", + "src": "9220:171:84", + "statements": [ + { + "body": { + "nativeSrc": "9266:16:84", + "nodeType": "YulBlock", + "src": "9266:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9275:1:84", + "nodeType": "YulLiteral", + "src": "9275:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9278:1:84", + "nodeType": "YulLiteral", + "src": "9278:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9268:6:84", + "nodeType": "YulIdentifier", + "src": "9268:6:84" + }, + "nativeSrc": "9268:12:84", + "nodeType": "YulFunctionCall", + "src": "9268:12:84" + }, + "nativeSrc": "9268:12:84", + "nodeType": "YulExpressionStatement", + "src": "9268:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "9241:7:84", + "nodeType": "YulIdentifier", + "src": "9241:7:84" + }, + { + "name": "headStart", + "nativeSrc": "9250:9:84", + "nodeType": "YulIdentifier", + "src": "9250:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9237:3:84", + "nodeType": "YulIdentifier", + "src": "9237:3:84" + }, + "nativeSrc": "9237:23:84", + "nodeType": "YulFunctionCall", + "src": "9237:23:84" + }, + { + "kind": "number", + "nativeSrc": "9262:2:84", + "nodeType": "YulLiteral", + "src": "9262:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "9233:3:84", + "nodeType": "YulIdentifier", + "src": "9233:3:84" + }, + "nativeSrc": "9233:32:84", + "nodeType": "YulFunctionCall", + "src": "9233:32:84" + }, + "nativeSrc": "9230:52:84", + "nodeType": "YulIf", + "src": "9230:52:84" + }, + { + "nativeSrc": "9291:38:84", + "nodeType": "YulAssignment", + "src": "9291:38:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9319:9:84", + "nodeType": "YulIdentifier", + "src": "9319:9:84" + } + ], + "functionName": { + "name": "abi_decode_uint48", + "nativeSrc": "9301:17:84", + "nodeType": "YulIdentifier", + "src": "9301:17:84" + }, + "nativeSrc": "9301:28:84", + "nodeType": "YulFunctionCall", + "src": "9301:28:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "9291:6:84", + "nodeType": "YulIdentifier", + "src": "9291:6:84" + } + ] + }, + { + "nativeSrc": "9338:47:84", + "nodeType": "YulAssignment", + "src": "9338:47:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9370:9:84", + "nodeType": "YulIdentifier", + "src": "9370:9:84" + }, + { + "kind": "number", + "nativeSrc": "9381:2:84", + "nodeType": "YulLiteral", + "src": "9381:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9366:3:84", + "nodeType": "YulIdentifier", + "src": "9366:3:84" + }, + "nativeSrc": "9366:18:84", + "nodeType": "YulFunctionCall", + "src": "9366:18:84" + } + ], + "functionName": { + "name": "abi_decode_uint48", + "nativeSrc": "9348:17:84", + "nodeType": "YulIdentifier", + "src": "9348:17:84" + }, + "nativeSrc": "9348:37:84", + "nodeType": "YulFunctionCall", + "src": "9348:37:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "9338:6:84", + "nodeType": "YulIdentifier", + "src": "9338:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint48t_uint48", + "nativeSrc": "9135:256:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9178:9:84", + "nodeType": "YulTypedName", + "src": "9178:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "9189:7:84", + "nodeType": "YulTypedName", + "src": "9189:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "9201:6:84", + "nodeType": "YulTypedName", + "src": "9201:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "9209:6:84", + "nodeType": "YulTypedName", + "src": "9209:6:84", + "type": "" + } + ], + "src": "9135:256:84" + }, + { + "body": { + "nativeSrc": "9444:174:84", + "nodeType": "YulBlock", + "src": "9444:174:84", + "statements": [ + { + "nativeSrc": "9454:16:84", + "nodeType": "YulAssignment", + "src": "9454:16:84", + "value": { + "arguments": [ + { + "name": "x", + "nativeSrc": "9465:1:84", + "nodeType": "YulIdentifier", + "src": "9465:1:84" + }, + { + "name": "y", + "nativeSrc": "9468:1:84", + "nodeType": "YulIdentifier", + "src": "9468:1:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9461:3:84", + "nodeType": "YulIdentifier", + "src": "9461:3:84" + }, + "nativeSrc": "9461:9:84", + "nodeType": "YulFunctionCall", + "src": "9461:9:84" + }, + "variableNames": [ + { + "name": "sum", + "nativeSrc": "9454:3:84", + "nodeType": "YulIdentifier", + "src": "9454:3:84" + } + ] + }, + { + "body": { + "nativeSrc": "9501:111:84", + "nodeType": "YulBlock", + "src": "9501:111:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9522:1:84", + "nodeType": "YulLiteral", + "src": "9522:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9529:3:84", + "nodeType": "YulLiteral", + "src": "9529:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "9534:10:84", + "nodeType": "YulLiteral", + "src": "9534:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9525:3:84", + "nodeType": "YulIdentifier", + "src": "9525:3:84" + }, + "nativeSrc": "9525:20:84", + "nodeType": "YulFunctionCall", + "src": "9525:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9515:6:84", + "nodeType": "YulIdentifier", + "src": "9515:6:84" + }, + "nativeSrc": "9515:31:84", + "nodeType": "YulFunctionCall", + "src": "9515:31:84" + }, + "nativeSrc": "9515:31:84", + "nodeType": "YulExpressionStatement", + "src": "9515:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9566:1:84", + "nodeType": "YulLiteral", + "src": "9566:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "9569:4:84", + "nodeType": "YulLiteral", + "src": "9569:4:84", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9559:6:84", + "nodeType": "YulIdentifier", + "src": "9559:6:84" + }, + "nativeSrc": "9559:15:84", + "nodeType": "YulFunctionCall", + "src": "9559:15:84" + }, + "nativeSrc": "9559:15:84", + "nodeType": "YulExpressionStatement", + "src": "9559:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9594:1:84", + "nodeType": "YulLiteral", + "src": "9594:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9597:4:84", + "nodeType": "YulLiteral", + "src": "9597:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9587:6:84", + "nodeType": "YulIdentifier", + "src": "9587:6:84" + }, + "nativeSrc": "9587:15:84", + "nodeType": "YulFunctionCall", + "src": "9587:15:84" + }, + "nativeSrc": "9587:15:84", + "nodeType": "YulExpressionStatement", + "src": "9587:15:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "x", + "nativeSrc": "9485:1:84", + "nodeType": "YulIdentifier", + "src": "9485:1:84" + }, + { + "name": "sum", + "nativeSrc": "9488:3:84", + "nodeType": "YulIdentifier", + "src": "9488:3:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "9482:2:84", + "nodeType": "YulIdentifier", + "src": "9482:2:84" + }, + "nativeSrc": "9482:10:84", + "nodeType": "YulFunctionCall", + "src": "9482:10:84" + }, + "nativeSrc": "9479:133:84", + "nodeType": "YulIf", + "src": "9479:133:84" + } + ] + }, + "name": "checked_add_t_uint256", + "nativeSrc": "9396:222:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "9427:1:84", + "nodeType": "YulTypedName", + "src": "9427:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "9430:1:84", + "nodeType": "YulTypedName", + "src": "9430:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "sum", + "nativeSrc": "9436:3:84", + "nodeType": "YulTypedName", + "src": "9436:3:84", + "type": "" + } + ], + "src": "9396:222:84" + }, + { + "body": { + "nativeSrc": "9740:102:84", + "nodeType": "YulBlock", + "src": "9740:102:84", + "statements": [ + { + "nativeSrc": "9750:26:84", + "nodeType": "YulAssignment", + "src": "9750:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9762:9:84", + "nodeType": "YulIdentifier", + "src": "9762:9:84" + }, + { + "kind": "number", + "nativeSrc": "9773:2:84", + "nodeType": "YulLiteral", + "src": "9773:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9758:3:84", + "nodeType": "YulIdentifier", + "src": "9758:3:84" + }, + "nativeSrc": "9758:18:84", + "nodeType": "YulFunctionCall", + "src": "9758:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "9750:4:84", + "nodeType": "YulIdentifier", + "src": "9750:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9792:9:84", + "nodeType": "YulIdentifier", + "src": "9792:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9807:6:84", + "nodeType": "YulIdentifier", + "src": "9807:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9823:3:84", + "nodeType": "YulLiteral", + "src": "9823:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "9828:1:84", + "nodeType": "YulLiteral", + "src": "9828:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9819:3:84", + "nodeType": "YulIdentifier", + "src": "9819:3:84" + }, + "nativeSrc": "9819:11:84", + "nodeType": "YulFunctionCall", + "src": "9819:11:84" + }, + { + "kind": "number", + "nativeSrc": "9832:1:84", + "nodeType": "YulLiteral", + "src": "9832:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9815:3:84", + "nodeType": "YulIdentifier", + "src": "9815:3:84" + }, + "nativeSrc": "9815:19:84", + "nodeType": "YulFunctionCall", + "src": "9815:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9803:3:84", + "nodeType": "YulIdentifier", + "src": "9803:3:84" + }, + "nativeSrc": "9803:32:84", + "nodeType": "YulFunctionCall", + "src": "9803:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9785:6:84", + "nodeType": "YulIdentifier", + "src": "9785:6:84" + }, + "nativeSrc": "9785:51:84", + "nodeType": "YulFunctionCall", + "src": "9785:51:84" + }, + "nativeSrc": "9785:51:84", + "nodeType": "YulExpressionStatement", + "src": "9785:51:84" + } + ] + }, + "name": "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed", + "nativeSrc": "9623:219:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9709:9:84", + "nodeType": "YulTypedName", + "src": "9709:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "9720:6:84", + "nodeType": "YulTypedName", + "src": "9720:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "9731:4:84", + "nodeType": "YulTypedName", + "src": "9731:4:84", + "type": "" + } + ], + "src": "9623:219:84" + }, + { + "body": { + "nativeSrc": "9928:103:84", + "nodeType": "YulBlock", + "src": "9928:103:84", + "statements": [ + { + "body": { + "nativeSrc": "9974:16:84", + "nodeType": "YulBlock", + "src": "9974:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9983:1:84", + "nodeType": "YulLiteral", + "src": "9983:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9986:1:84", + "nodeType": "YulLiteral", + "src": "9986:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9976:6:84", + "nodeType": "YulIdentifier", + "src": "9976:6:84" + }, + "nativeSrc": "9976:12:84", + "nodeType": "YulFunctionCall", + "src": "9976:12:84" + }, + "nativeSrc": "9976:12:84", + "nodeType": "YulExpressionStatement", + "src": "9976:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "9949:7:84", + "nodeType": "YulIdentifier", + "src": "9949:7:84" + }, + { + "name": "headStart", + "nativeSrc": "9958:9:84", + "nodeType": "YulIdentifier", + "src": "9958:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9945:3:84", + "nodeType": "YulIdentifier", + "src": "9945:3:84" + }, + "nativeSrc": "9945:23:84", + "nodeType": "YulFunctionCall", + "src": "9945:23:84" + }, + { + "kind": "number", + "nativeSrc": "9970:2:84", + "nodeType": "YulLiteral", + "src": "9970:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "9941:3:84", + "nodeType": "YulIdentifier", + "src": "9941:3:84" + }, + "nativeSrc": "9941:32:84", + "nodeType": "YulFunctionCall", + "src": "9941:32:84" + }, + "nativeSrc": "9938:52:84", + "nodeType": "YulIf", + "src": "9938:52:84" + }, + { + "nativeSrc": "9999:26:84", + "nodeType": "YulAssignment", + "src": "9999:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10015:9:84", + "nodeType": "YulIdentifier", + "src": "10015:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10009:5:84", + "nodeType": "YulIdentifier", + "src": "10009:5:84" + }, + "nativeSrc": "10009:16:84", + "nodeType": "YulFunctionCall", + "src": "10009:16:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "9999:6:84", + "nodeType": "YulIdentifier", + "src": "9999:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256_fromMemory", + "nativeSrc": "9847:184:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9894:9:84", + "nodeType": "YulTypedName", + "src": "9894:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "9905:7:84", + "nodeType": "YulTypedName", + "src": "9905:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "9917:6:84", + "nodeType": "YulTypedName", + "src": "9917:6:84", + "type": "" + } + ], + "src": "9847:184:84" + }, + { + "body": { + "nativeSrc": "10210:171:84", + "nodeType": "YulBlock", + "src": "10210:171:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10227:9:84", + "nodeType": "YulIdentifier", + "src": "10227:9:84" + }, + { + "kind": "number", + "nativeSrc": "10238:2:84", + "nodeType": "YulLiteral", + "src": "10238:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10220:6:84", + "nodeType": "YulIdentifier", + "src": "10220:6:84" + }, + "nativeSrc": "10220:21:84", + "nodeType": "YulFunctionCall", + "src": "10220:21:84" + }, + "nativeSrc": "10220:21:84", + "nodeType": "YulExpressionStatement", + "src": "10220:21:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10261:9:84", + "nodeType": "YulIdentifier", + "src": "10261:9:84" + }, + { + "kind": "number", + "nativeSrc": "10272:2:84", + "nodeType": "YulLiteral", + "src": "10272:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10257:3:84", + "nodeType": "YulIdentifier", + "src": "10257:3:84" + }, + "nativeSrc": "10257:18:84", + "nodeType": "YulFunctionCall", + "src": "10257:18:84" + }, + { + "kind": "number", + "nativeSrc": "10277:2:84", + "nodeType": "YulLiteral", + "src": "10277:2:84", + "type": "", + "value": "21" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10250:6:84", + "nodeType": "YulIdentifier", + "src": "10250:6:84" + }, + "nativeSrc": "10250:30:84", + "nodeType": "YulFunctionCall", + "src": "10250:30:84" + }, + "nativeSrc": "10250:30:84", + "nodeType": "YulExpressionStatement", + "src": "10250:30:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10300:9:84", + "nodeType": "YulIdentifier", + "src": "10300:9:84" + }, + { + "kind": "number", + "nativeSrc": "10311:2:84", + "nodeType": "YulLiteral", + "src": "10311:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10296:3:84", + "nodeType": "YulIdentifier", + "src": "10296:3:84" + }, + "nativeSrc": "10296:18:84", + "nodeType": "YulFunctionCall", + "src": "10296:18:84" + }, + { + "hexValue": "53656e646572206e6f7420456e747279506f696e74", + "kind": "string", + "nativeSrc": "10316:23:84", + "nodeType": "YulLiteral", + "src": "10316:23:84", + "type": "", + "value": "Sender not EntryPoint" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10289:6:84", + "nodeType": "YulIdentifier", + "src": "10289:6:84" + }, + "nativeSrc": "10289:51:84", + "nodeType": "YulFunctionCall", + "src": "10289:51:84" + }, + "nativeSrc": "10289:51:84", + "nodeType": "YulExpressionStatement", + "src": "10289:51:84" + }, + { + "nativeSrc": "10349:26:84", + "nodeType": "YulAssignment", + "src": "10349:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10361:9:84", + "nodeType": "YulIdentifier", + "src": "10361:9:84" + }, + { + "kind": "number", + "nativeSrc": "10372:2:84", + "nodeType": "YulLiteral", + "src": "10372:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10357:3:84", + "nodeType": "YulIdentifier", + "src": "10357:3:84" + }, + "nativeSrc": "10357:18:84", + "nodeType": "YulFunctionCall", + "src": "10357:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "10349:4:84", + "nodeType": "YulIdentifier", + "src": "10349:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_4f1183fece38266d89bbd94d1c93e02d713970166951c4c8f2c10a21e7cddae9__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "10036:345:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "10187:9:84", + "nodeType": "YulTypedName", + "src": "10187:9:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "10201:4:84", + "nodeType": "YulTypedName", + "src": "10201:4:84", + "type": "" + } + ], + "src": "10036:345:84" + }, + { + "body": { + "nativeSrc": "10560:254:84", + "nodeType": "YulBlock", + "src": "10560:254:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10577:9:84", + "nodeType": "YulIdentifier", + "src": "10577:9:84" + }, + { + "kind": "number", + "nativeSrc": "10588:2:84", + "nodeType": "YulLiteral", + "src": "10588:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10570:6:84", + "nodeType": "YulIdentifier", + "src": "10570:6:84" + }, + "nativeSrc": "10570:21:84", + "nodeType": "YulFunctionCall", + "src": "10570:21:84" + }, + "nativeSrc": "10570:21:84", + "nodeType": "YulExpressionStatement", + "src": "10570:21:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10611:9:84", + "nodeType": "YulIdentifier", + "src": "10611:9:84" + }, + { + "kind": "number", + "nativeSrc": "10622:2:84", + "nodeType": "YulLiteral", + "src": "10622:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10607:3:84", + "nodeType": "YulIdentifier", + "src": "10607:3:84" + }, + "nativeSrc": "10607:18:84", + "nodeType": "YulFunctionCall", + "src": "10607:18:84" + }, + { + "kind": "number", + "nativeSrc": "10627:2:84", + "nodeType": "YulLiteral", + "src": "10627:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10600:6:84", + "nodeType": "YulIdentifier", + "src": "10600:6:84" + }, + "nativeSrc": "10600:30:84", + "nodeType": "YulFunctionCall", + "src": "10600:30:84" + }, + "nativeSrc": "10600:30:84", + "nodeType": "YulExpressionStatement", + "src": "10600:30:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10650:9:84", + "nodeType": "YulIdentifier", + "src": "10650:9:84" + }, + { + "kind": "number", + "nativeSrc": "10661:2:84", + "nodeType": "YulLiteral", + "src": "10661:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10646:3:84", + "nodeType": "YulIdentifier", + "src": "10646:3:84" + }, + "nativeSrc": "10646:18:84", + "nodeType": "YulFunctionCall", + "src": "10646:18:84" + }, + { + "hexValue": "566572696679696e675061796d61737465723a20696e76616c6964207369676e", + "kind": "string", + "nativeSrc": "10666:34:84", + "nodeType": "YulLiteral", + "src": "10666:34:84", + "type": "", + "value": "VerifyingPaymaster: invalid sign" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10639:6:84", + "nodeType": "YulIdentifier", + "src": "10639:6:84" + }, + "nativeSrc": "10639:62:84", + "nodeType": "YulFunctionCall", + "src": "10639:62:84" + }, + "nativeSrc": "10639:62:84", + "nodeType": "YulExpressionStatement", + "src": "10639:62:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10721:9:84", + "nodeType": "YulIdentifier", + "src": "10721:9:84" + }, + { + "kind": "number", + "nativeSrc": "10732:2:84", + "nodeType": "YulLiteral", + "src": "10732:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10717:3:84", + "nodeType": "YulIdentifier", + "src": "10717:3:84" + }, + "nativeSrc": "10717:18:84", + "nodeType": "YulFunctionCall", + "src": "10717:18:84" + }, + { + "hexValue": "6174757265206c656e67746820696e207061796d6173746572416e6444617461", + "kind": "string", + "nativeSrc": "10737:34:84", + "nodeType": "YulLiteral", + "src": "10737:34:84", + "type": "", + "value": "ature length in paymasterAndData" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10710:6:84", + "nodeType": "YulIdentifier", + "src": "10710:6:84" + }, + "nativeSrc": "10710:62:84", + "nodeType": "YulFunctionCall", + "src": "10710:62:84" + }, + "nativeSrc": "10710:62:84", + "nodeType": "YulExpressionStatement", + "src": "10710:62:84" + }, + { + "nativeSrc": "10781:27:84", + "nodeType": "YulAssignment", + "src": "10781:27:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10793:9:84", + "nodeType": "YulIdentifier", + "src": "10793:9:84" + }, + { + "kind": "number", + "nativeSrc": "10804:3:84", + "nodeType": "YulLiteral", + "src": "10804:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10789:3:84", + "nodeType": "YulIdentifier", + "src": "10789:3:84" + }, + "nativeSrc": "10789:19:84", + "nodeType": "YulFunctionCall", + "src": "10789:19:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "10781:4:84", + "nodeType": "YulIdentifier", + "src": "10781:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_c0ccd72718b49b9af08aac30156bc47d10e177349cbe5dac0a36b471195929a7__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "10386:428:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "10537:9:84", + "nodeType": "YulTypedName", + "src": "10537:9:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "10551:4:84", + "nodeType": "YulTypedName", + "src": "10551:4:84", + "type": "" + } + ], + "src": "10386:428:84" + }, + { + "body": { + "nativeSrc": "10993:163:84", + "nodeType": "YulBlock", + "src": "10993:163:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11010:9:84", + "nodeType": "YulIdentifier", + "src": "11010:9:84" + }, + { + "kind": "number", + "nativeSrc": "11021:2:84", + "nodeType": "YulLiteral", + "src": "11021:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11003:6:84", + "nodeType": "YulIdentifier", + "src": "11003:6:84" + }, + "nativeSrc": "11003:21:84", + "nodeType": "YulFunctionCall", + "src": "11003:21:84" + }, + "nativeSrc": "11003:21:84", + "nodeType": "YulExpressionStatement", + "src": "11003:21:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11044:9:84", + "nodeType": "YulIdentifier", + "src": "11044:9:84" + }, + { + "kind": "number", + "nativeSrc": "11055:2:84", + "nodeType": "YulLiteral", + "src": "11055:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11040:3:84", + "nodeType": "YulIdentifier", + "src": "11040:3:84" + }, + "nativeSrc": "11040:18:84", + "nodeType": "YulFunctionCall", + "src": "11040:18:84" + }, + { + "kind": "number", + "nativeSrc": "11060:2:84", + "nodeType": "YulLiteral", + "src": "11060:2:84", + "type": "", + "value": "13" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11033:6:84", + "nodeType": "YulIdentifier", + "src": "11033:6:84" + }, + "nativeSrc": "11033:30:84", + "nodeType": "YulFunctionCall", + "src": "11033:30:84" + }, + "nativeSrc": "11033:30:84", + "nodeType": "YulExpressionStatement", + "src": "11033:30:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11083:9:84", + "nodeType": "YulIdentifier", + "src": "11083:9:84" + }, + { + "kind": "number", + "nativeSrc": "11094:2:84", + "nodeType": "YulLiteral", + "src": "11094:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11079:3:84", + "nodeType": "YulIdentifier", + "src": "11079:3:84" + }, + "nativeSrc": "11079:18:84", + "nodeType": "YulFunctionCall", + "src": "11079:18:84" + }, + { + "hexValue": "6d757374206f76657272696465", + "kind": "string", + "nativeSrc": "11099:15:84", + "nodeType": "YulLiteral", + "src": "11099:15:84", + "type": "", + "value": "must override" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11072:6:84", + "nodeType": "YulIdentifier", + "src": "11072:6:84" + }, + "nativeSrc": "11072:43:84", + "nodeType": "YulFunctionCall", + "src": "11072:43:84" + }, + "nativeSrc": "11072:43:84", + "nodeType": "YulExpressionStatement", + "src": "11072:43:84" + }, + { + "nativeSrc": "11124:26:84", + "nodeType": "YulAssignment", + "src": "11124:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11136:9:84", + "nodeType": "YulIdentifier", + "src": "11136:9:84" + }, + { + "kind": "number", + "nativeSrc": "11147:2:84", + "nodeType": "YulLiteral", + "src": "11147:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11132:3:84", + "nodeType": "YulIdentifier", + "src": "11132:3:84" + }, + "nativeSrc": "11132:18:84", + "nodeType": "YulFunctionCall", + "src": "11132:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "11124:4:84", + "nodeType": "YulIdentifier", + "src": "11124:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_cfebc7a599a78eb43bf12fd80d02a05464d681b0cdda54c5b6b39e95676c7f1d__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "10819:337:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "10970:9:84", + "nodeType": "YulTypedName", + "src": "10970:9:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "10984:4:84", + "nodeType": "YulTypedName", + "src": "10984:4:84", + "type": "" + } + ], + "src": "10819:337:84" + }, + { + "body": { + "nativeSrc": "11193:95:84", + "nodeType": "YulBlock", + "src": "11193:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11210:1:84", + "nodeType": "YulLiteral", + "src": "11210:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11217:3:84", + "nodeType": "YulLiteral", + "src": "11217:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "11222:10:84", + "nodeType": "YulLiteral", + "src": "11222:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "11213:3:84", + "nodeType": "YulIdentifier", + "src": "11213:3:84" + }, + "nativeSrc": "11213:20:84", + "nodeType": "YulFunctionCall", + "src": "11213:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11203:6:84", + "nodeType": "YulIdentifier", + "src": "11203:6:84" + }, + "nativeSrc": "11203:31:84", + "nodeType": "YulFunctionCall", + "src": "11203:31:84" + }, + "nativeSrc": "11203:31:84", + "nodeType": "YulExpressionStatement", + "src": "11203:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11250:1:84", + "nodeType": "YulLiteral", + "src": "11250:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "11253:4:84", + "nodeType": "YulLiteral", + "src": "11253:4:84", + "type": "", + "value": "0x21" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11243:6:84", + "nodeType": "YulIdentifier", + "src": "11243:6:84" + }, + "nativeSrc": "11243:15:84", + "nodeType": "YulFunctionCall", + "src": "11243:15:84" + }, + "nativeSrc": "11243:15:84", + "nodeType": "YulExpressionStatement", + "src": "11243:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11274:1:84", + "nodeType": "YulLiteral", + "src": "11274:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "11277:4:84", + "nodeType": "YulLiteral", + "src": "11277:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "11267:6:84", + "nodeType": "YulIdentifier", + "src": "11267:6:84" + }, + "nativeSrc": "11267:15:84", + "nodeType": "YulFunctionCall", + "src": "11267:15:84" + }, + "nativeSrc": "11267:15:84", + "nodeType": "YulExpressionStatement", + "src": "11267:15:84" + } + ] + }, + "name": "panic_error_0x21", + "nativeSrc": "11161:127:84", + "nodeType": "YulFunctionDefinition", + "src": "11161:127:84" + }, + { + "body": { + "nativeSrc": "11474:217:84", + "nodeType": "YulBlock", + "src": "11474:217:84", + "statements": [ + { + "nativeSrc": "11484:27:84", + "nodeType": "YulAssignment", + "src": "11484:27:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11496:9:84", + "nodeType": "YulIdentifier", + "src": "11496:9:84" + }, + { + "kind": "number", + "nativeSrc": "11507:3:84", + "nodeType": "YulLiteral", + "src": "11507:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11492:3:84", + "nodeType": "YulIdentifier", + "src": "11492:3:84" + }, + "nativeSrc": "11492:19:84", + "nodeType": "YulFunctionCall", + "src": "11492:19:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "11484:4:84", + "nodeType": "YulIdentifier", + "src": "11484:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11527:9:84", + "nodeType": "YulIdentifier", + "src": "11527:9:84" + }, + { + "name": "value0", + "nativeSrc": "11538:6:84", + "nodeType": "YulIdentifier", + "src": "11538:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11520:6:84", + "nodeType": "YulIdentifier", + "src": "11520:6:84" + }, + "nativeSrc": "11520:25:84", + "nodeType": "YulFunctionCall", + "src": "11520:25:84" + }, + "nativeSrc": "11520:25:84", + "nodeType": "YulExpressionStatement", + "src": "11520:25:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11565:9:84", + "nodeType": "YulIdentifier", + "src": "11565:9:84" + }, + { + "kind": "number", + "nativeSrc": "11576:2:84", + "nodeType": "YulLiteral", + "src": "11576:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11561:3:84", + "nodeType": "YulIdentifier", + "src": "11561:3:84" + }, + "nativeSrc": "11561:18:84", + "nodeType": "YulFunctionCall", + "src": "11561:18:84" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "11585:6:84", + "nodeType": "YulIdentifier", + "src": "11585:6:84" + }, + { + "kind": "number", + "nativeSrc": "11593:4:84", + "nodeType": "YulLiteral", + "src": "11593:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11581:3:84", + "nodeType": "YulIdentifier", + "src": "11581:3:84" + }, + "nativeSrc": "11581:17:84", + "nodeType": "YulFunctionCall", + "src": "11581:17:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11554:6:84", + "nodeType": "YulIdentifier", + "src": "11554:6:84" + }, + "nativeSrc": "11554:45:84", + "nodeType": "YulFunctionCall", + "src": "11554:45:84" + }, + "nativeSrc": "11554:45:84", + "nodeType": "YulExpressionStatement", + "src": "11554:45:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11619:9:84", + "nodeType": "YulIdentifier", + "src": "11619:9:84" + }, + { + "kind": "number", + "nativeSrc": "11630:2:84", + "nodeType": "YulLiteral", + "src": "11630:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11615:3:84", + "nodeType": "YulIdentifier", + "src": "11615:3:84" + }, + "nativeSrc": "11615:18:84", + "nodeType": "YulFunctionCall", + "src": "11615:18:84" + }, + { + "name": "value2", + "nativeSrc": "11635:6:84", + "nodeType": "YulIdentifier", + "src": "11635:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11608:6:84", + "nodeType": "YulIdentifier", + "src": "11608:6:84" + }, + "nativeSrc": "11608:34:84", + "nodeType": "YulFunctionCall", + "src": "11608:34:84" + }, + "nativeSrc": "11608:34:84", + "nodeType": "YulExpressionStatement", + "src": "11608:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11662:9:84", + "nodeType": "YulIdentifier", + "src": "11662:9:84" + }, + { + "kind": "number", + "nativeSrc": "11673:2:84", + "nodeType": "YulLiteral", + "src": "11673:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11658:3:84", + "nodeType": "YulIdentifier", + "src": "11658:3:84" + }, + "nativeSrc": "11658:18:84", + "nodeType": "YulFunctionCall", + "src": "11658:18:84" + }, + { + "name": "value3", + "nativeSrc": "11678:6:84", + "nodeType": "YulIdentifier", + "src": "11678:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11651:6:84", + "nodeType": "YulIdentifier", + "src": "11651:6:84" + }, + "nativeSrc": "11651:34:84", + "nodeType": "YulFunctionCall", + "src": "11651:34:84" + }, + "nativeSrc": "11651:34:84", + "nodeType": "YulExpressionStatement", + "src": "11651:34:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed", + "nativeSrc": "11293:398:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "11419:9:84", + "nodeType": "YulTypedName", + "src": "11419:9:84", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "11430:6:84", + "nodeType": "YulTypedName", + "src": "11430:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "11438:6:84", + "nodeType": "YulTypedName", + "src": "11438:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "11446:6:84", + "nodeType": "YulTypedName", + "src": "11446:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "11454:6:84", + "nodeType": "YulTypedName", + "src": "11454:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "11465:4:84", + "nodeType": "YulTypedName", + "src": "11465:4:84", + "type": "" + } + ], + "src": "11293:398:84" + } + ] + }, + "contents": "{\n { }\n function abi_decode_tuple_t_uint32(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, 0xffffffff))) { revert(0, 0) }\n value0 := value\n }\n function validator_revert_address_payable(value)\n {\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_address_payablet_uint256(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_address_payable(value)\n value0 := value\n value1 := calldataload(add(headStart, 32))\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_decode_struct_PackedUserOperation_calldata(offset, end) -> value\n {\n if slt(sub(end, offset), 288) { revert(0, 0) }\n value := offset\n }\n function abi_decode_tuple_t_struct$_PackedUserOperation_$7243_calldata_ptrt_bytes32t_uint256(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_struct_PackedUserOperation_calldata(add(headStart, offset), dataEnd)\n value1 := calldataload(add(headStart, 32))\n value2 := calldataload(add(headStart, 64))\n }\n function abi_encode_tuple_t_bytes_memory_ptr_t_uint256__to_t_bytes_memory_ptr_t_uint256__fromStack_reversed(headStart, value1, value0) -> tail\n {\n mstore(headStart, 64)\n let length := mload(value0)\n mstore(add(headStart, 64), length)\n let i := 0\n for { } lt(i, length) { i := add(i, 0x20) }\n {\n mstore(add(add(headStart, i), 96), mload(add(add(value0, i), 0x20)))\n }\n mstore(add(add(headStart, length), 96), 0)\n tail := add(add(headStart, and(add(length, 31), not(31))), 96)\n mstore(add(headStart, 0x20), value1)\n }\n function abi_decode_uint48(offset) -> value\n {\n value := calldataload(offset)\n if iszero(eq(value, and(value, 0xffffffffffff))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_struct$_PackedUserOperation_$7243_calldata_ptrt_uint48t_uint48(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_struct_PackedUserOperation_calldata(add(headStart, offset), dataEnd)\n value1 := abi_decode_uint48(add(headStart, 32))\n value2 := abi_decode_uint48(add(headStart, 64))\n }\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_decode_bytes_calldata(offset, end) -> arrayPos, length\n {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n length := calldataload(offset)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n arrayPos := add(offset, 0x20)\n if gt(add(add(offset, length), 0x20), end) { revert(0, 0) }\n }\n function abi_decode_tuple_t_enum$_PostOpMode_$7088t_bytes_calldata_ptrt_uint256t_uint256(headStart, dataEnd) -> value0, value1, value2, value3, value4\n {\n if slt(sub(dataEnd, headStart), 128) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(lt(value, 3)) { revert(0, 0) }\n value0 := value\n let offset := calldataload(add(headStart, 32))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let value1_1, value2_1 := abi_decode_bytes_calldata(add(headStart, offset), dataEnd)\n value1 := value1_1\n value2 := value2_1\n value3 := calldataload(add(headStart, 64))\n value4 := calldataload(add(headStart, 96))\n }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_address_payable(value)\n value0 := value\n }\n function abi_decode_tuple_t_bytes_calldata_ptr(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let value0_1, value1_1 := abi_decode_bytes_calldata(add(headStart, offset), dataEnd)\n value0 := value0_1\n value1 := value1_1\n }\n function abi_encode_tuple_t_uint48_t_uint48_t_bytes_calldata_ptr__to_t_uint48_t_uint48_t_bytes_memory_ptr__fromStack_reversed(headStart, value3, value2, value1, value0) -> tail\n {\n let _1 := 0xffffffffffff\n mstore(headStart, and(value0, _1))\n mstore(add(headStart, 32), and(value1, _1))\n mstore(add(headStart, 64), 96)\n mstore(add(headStart, 96), value3)\n calldatacopy(add(headStart, 128), value2, value3)\n mstore(add(add(headStart, value3), 128), 0)\n tail := add(add(headStart, and(add(value3, 31), not(31))), 128)\n }\n function abi_encode_tuple_t_contract$_IEntryPoint_$7000__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_decode_tuple_t_address_payable(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_address_payable(value)\n value0 := value\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_uint32__to_t_uint32__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, 0xffffffff))\n }\n function abi_encode_tuple_t_address_payable_t_uint256__to_t_address_payable_t_uint256__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n mstore(add(headStart, 32), value1)\n }\n function access_calldata_tail_t_bytes_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), length)) { revert(0, 0) }\n }\n function abi_encode_tuple_packed_t_bytes_calldata_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value1, value0) -> end\n {\n calldatacopy(pos, value0, value1)\n let _1 := add(pos, value1)\n mstore(_1, 0)\n end := _1\n }\n function calldata_array_index_range_access_t_bytes_calldata_ptr(offset, length, startIndex, endIndex) -> offsetOut, lengthOut\n {\n if gt(startIndex, endIndex) { revert(0, 0) }\n if gt(endIndex, length) { revert(0, 0) }\n offsetOut := add(offset, startIndex)\n lengthOut := sub(endIndex, startIndex)\n }\n function convert_bytes_to_fixedbytes_from_t_bytes_calldata_ptr_to_t_bytes32(array, len) -> value\n {\n value := calldataload(array)\n if lt(len, 32)\n {\n value := and(value, shl(shl(3, sub(32, len)), not(0)))\n }\n }\n function abi_encode_tuple_t_address_t_uint256_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_uint256_t_bytes32_t_uint256_t_address_t_uint48_t_uint48__to_t_address_t_uint256_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_uint256_t_bytes32_t_uint256_t_address_t_uint48_t_uint48__fromStack_reversed(headStart, value11, value10, value9, value8, value7, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 384)\n let _1 := sub(shl(160, 1), 1)\n mstore(headStart, and(value0, _1))\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), value4)\n mstore(add(headStart, 160), value5)\n mstore(add(headStart, 192), value6)\n mstore(add(headStart, 224), value7)\n mstore(add(headStart, 256), value8)\n mstore(add(headStart, 288), and(value9, _1))\n let _2 := 0xffffffffffff\n mstore(add(headStart, 320), and(value10, _2))\n mstore(add(headStart, 352), and(value11, _2))\n }\n function abi_decode_tuple_t_uint48t_uint48(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n value0 := abi_decode_uint48(headStart)\n value1 := abi_decode_uint48(add(headStart, 32))\n }\n function checked_add_t_uint256(x, y) -> sum\n {\n sum := add(x, y)\n if gt(x, sum)\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n }\n function abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := mload(headStart)\n }\n function abi_encode_tuple_t_stringliteral_4f1183fece38266d89bbd94d1c93e02d713970166951c4c8f2c10a21e7cddae9__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 21)\n mstore(add(headStart, 64), \"Sender not EntryPoint\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_c0ccd72718b49b9af08aac30156bc47d10e177349cbe5dac0a36b471195929a7__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 64)\n mstore(add(headStart, 64), \"VerifyingPaymaster: invalid sign\")\n mstore(add(headStart, 96), \"ature length in paymasterAndData\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_stringliteral_cfebc7a599a78eb43bf12fd80d02a05464d681b0cdda54c5b6b39e95676c7f1d__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 13)\n mstore(add(headStart, 64), \"must override\")\n tail := add(headStart, 96)\n }\n function panic_error_0x21()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x21)\n revert(0, 0x24)\n }\n function abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed(headStart, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 128)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, 0xff))\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n }\n}", + "id": 84, + "language": "Yul", + "name": "#utility.yul" + } + ], + "immutableReferences": { + "2881": [ + { + "length": 32, + "start": 635 + }, + { + "length": 32, + "start": 817 + }, + { + "length": 32, + "start": 968 + }, + { + "length": 32, + "start": 1566 + }, + { + "length": 32, + "start": 1720 + }, + { + "length": 32, + "start": 1832 + }, + { + "length": 32, + "start": 1973 + }, + { + "length": 32, + "start": 2173 + } + ] + }, + "linkReferences": {}, + "object": "6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xF3 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x93B94121 GT PUSH2 0x8A JUMPI DUP1 PUSH4 0xC23A5CEA GT PUSH2 0x59 JUMPI DUP1 PUSH4 0xC23A5CEA EQ PUSH2 0x2B2 JUMPI DUP1 PUSH4 0xC399EC88 EQ PUSH2 0x2D2 JUMPI DUP1 PUSH4 0xD0E30DB0 EQ PUSH2 0x2E7 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x2EF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x93B94121 EQ PUSH2 0x219 JUMPI DUP1 PUSH4 0x94D4AD60 EQ PUSH2 0x239 JUMPI DUP1 PUSH4 0xB0D691FE EQ PUSH2 0x269 JUMPI DUP1 PUSH4 0xBB9FE6BF EQ PUSH2 0x29D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x5829C5F5 GT PUSH2 0xC6 JUMPI DUP1 PUSH4 0x5829C5F5 EQ PUSH2 0x198 JUMPI DUP1 PUSH4 0x715018A6 EQ PUSH2 0x1C6 JUMPI DUP1 PUSH4 0x7C627B21 EQ PUSH2 0x1DB JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x1FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x396CB60 EQ PUSH2 0xF8 JUMPI DUP1 PUSH4 0x205C2878 EQ PUSH2 0x10D JUMPI DUP1 PUSH4 0x23D9AC9B EQ PUSH2 0x12D JUMPI DUP1 PUSH4 0x52B7512C EQ PUSH2 0x16A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10B PUSH2 0x106 CALLDATASIZE PUSH1 0x4 PUSH2 0xD3C JUMP JUMPDEST PUSH2 0x30F JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x119 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x128 CALLDATASIZE PUSH1 0x4 PUSH2 0xD7E JUMP JUMPDEST PUSH2 0x39A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x139 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 SLOAD PUSH2 0x14D SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x176 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x18A PUSH2 0x185 CALLDATASIZE PUSH1 0x4 PUSH2 0xDC3 JUMP JUMPDEST PUSH2 0x40C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x161 SWAP3 SWAP2 SWAP1 PUSH2 0xE11 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B8 PUSH2 0x1B3 CALLDATASIZE PUSH1 0x4 PUSH2 0xE81 JUMP JUMPDEST PUSH2 0x430 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x161 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1D2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x540 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1E7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xF28 JUMP JUMPDEST PUSH2 0x554 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x207 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x14D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x225 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x234 CALLDATASIZE PUSH1 0x4 PUSH2 0xF93 JUMP JUMPDEST PUSH2 0x570 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x245 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x259 PUSH2 0x254 CALLDATASIZE PUSH1 0x4 PUSH2 0xFB0 JUMP JUMPDEST PUSH2 0x5CC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x161 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xFF2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x275 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x14D PUSH32 0x0 DUP2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2A9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x614 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x2CD CALLDATASIZE PUSH1 0x4 PUSH2 0xF93 JUMP JUMPDEST PUSH2 0x691 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2DE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B8 PUSH2 0x710 JUMP JUMPDEST PUSH2 0x10B PUSH2 0x7A0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10B PUSH2 0x30A CALLDATASIZE PUSH1 0x4 PUSH2 0xF93 JUMP JUMPDEST PUSH2 0x802 JUMP JUMPDEST PUSH2 0x317 PUSH2 0x845 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x1CB65B PUSH1 0xE5 SHL DUP2 MSTORE PUSH4 0xFFFFFFFF DUP3 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x396CB60 SWAP1 CALLVALUE SWAP1 PUSH1 0x24 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x37E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x392 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x3A2 PUSH2 0x845 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x40B850F PUSH1 0xE3 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE PUSH1 0x24 DUP3 ADD DUP4 SWAP1 MSTORE PUSH32 0x0 AND SWAP1 PUSH4 0x205C2878 SWAP1 PUSH1 0x44 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x37E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x418 PUSH2 0x872 JUMP JUMPDEST PUSH2 0x423 DUP6 DUP6 DUP6 PUSH2 0x8E2 JUMP JUMPDEST SWAP2 POP SWAP2 POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 CALLDATALOAD DUP1 PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH2 0x447 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x103E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x455 SWAP3 SWAP2 SWAP1 PUSH2 0x1085 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 SWAP1 SUB SWAP1 KECCAK256 PUSH2 0x46B PUSH1 0x60 DUP10 ADD DUP10 PUSH2 0x103E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x479 SWAP3 SWAP2 SWAP1 PUSH2 0x1085 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 SWAP1 SUB SWAP1 KECCAK256 PUSH1 0x80 DUP10 ADD CALLDATALOAD PUSH2 0x494 PUSH1 0xE0 DUP12 ADD DUP12 PUSH2 0x103E JUMP JUMPDEST PUSH2 0x4A3 SWAP2 PUSH1 0x34 SWAP2 PUSH1 0x14 SWAP2 PUSH2 0x1095 JUMP JUMPDEST PUSH2 0x4AC SWAP2 PUSH2 0x10BF JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP8 AND PUSH1 0x20 DUP9 ADD MSTORE DUP7 ADD SWAP5 SWAP1 SWAP5 MSTORE PUSH1 0x60 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x80 DUP5 ADD MSTORE PUSH1 0xA0 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xC0 DUP1 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP8 ADD CALLDATALOAD PUSH1 0xE0 DUP4 ADD MSTORE DUP7 ADD CALLDATALOAD PUSH2 0x100 DUP3 ADD MSTORE CHAINID PUSH2 0x120 DUP3 ADD MSTORE ADDRESS PUSH2 0x140 DUP3 ADD MSTORE PUSH6 0xFFFFFFFFFFFF DUP1 DUP7 AND PUSH2 0x160 DUP4 ADD MSTORE DUP5 AND PUSH2 0x180 DUP3 ADD MSTORE PUSH2 0x1A0 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x548 PUSH2 0x845 JUMP JUMPDEST PUSH2 0x552 PUSH1 0x0 PUSH2 0xA77 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0x55C PUSH2 0x872 JUMP JUMPDEST PUSH2 0x569 DUP6 DUP6 DUP6 DUP6 DUP6 PUSH2 0xAC7 JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH2 0x578 PUSH2 0x845 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH32 0x51D754AC8F7ADF515A023F2C423E01EF97817C1AF33CB63B36F1FE12FDE2D91A SWAP1 PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 CALLDATASIZE DUP2 PUSH2 0x5DE DUP6 PUSH1 0x34 DUP2 DUP10 PUSH2 0x1095 JUMP JUMPDEST DUP2 ADD SWAP1 PUSH2 0x5EB SWAP2 SWAP1 PUSH2 0x10DD JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP DUP6 DUP6 PUSH2 0x5FE PUSH1 0x34 PUSH1 0x40 PUSH2 0x1110 JUMP JUMPDEST PUSH2 0x609 SWAP3 DUP3 SWAP1 PUSH2 0x1095 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP5 POP POP POP JUMP JUMPDEST PUSH2 0x61C PUSH2 0x845 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xBB9FE6BF PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x677 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x68B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0x699 PUSH2 0x845 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x611D2E75 PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE PUSH32 0x0 AND SWAP1 PUSH4 0xC23A5CEA SWAP1 PUSH1 0x24 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x6FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x569 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x70A08231 PUSH1 0xE0 SHL DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x0 SWAP1 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x70A08231 SWAP1 PUSH1 0x24 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x777 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x79B SWAP2 SWAP1 PUSH2 0x1131 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xB760FAF9 PUSH1 0xE0 SHL DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0xB760FAF9 SWAP1 CALLVALUE SWAP1 PUSH1 0x24 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x6FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x80A PUSH2 0x845 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x839 JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x842 DUP2 PUSH2 0xA77 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x552 JUMPI PUSH1 0x40 MLOAD PUSH4 0x118CDAA7 PUSH1 0xE0 SHL DUP2 MSTORE CALLER PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x830 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND EQ PUSH2 0x552 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x15 PUSH1 0x24 DUP3 ADD MSTORE PUSH21 0x14D95B99195C881B9BDD08115B9D1C9E541BDA5B9D PUSH1 0x5A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x830 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 DUP1 CALLDATASIZE DUP2 PUSH2 0x8FA PUSH2 0x254 PUSH1 0xE0 DUP12 ADD DUP12 PUSH2 0x103E JUMP JUMPDEST SWAP3 SWAP7 POP SWAP1 SWAP5 POP SWAP3 POP SWAP1 POP PUSH1 0x40 DUP2 EQ DUP1 PUSH2 0x913 JUMPI POP PUSH1 0x41 DUP2 EQ JUMPDEST PUSH2 0x987 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH32 0x566572696679696E675061796D61737465723A20696E76616C6964207369676E PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x6174757265206C656E67746820696E207061796D6173746572416E6444617461 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x830 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x9CA PUSH2 0x997 DUP12 DUP8 DUP8 PUSH2 0x430 JUMP JUMPDEST PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1C SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x3C SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST SWAP1 POP PUSH2 0xA0C DUP2 DUP5 DUP5 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP PUSH2 0xAFF SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND SWAP2 AND EQ PUSH2 0xA4C JUMPI PUSH2 0xA2D PUSH1 0x1 DUP7 DUP7 PUSH2 0xB2B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 SWAP7 POP SWAP7 POP POP POP POP POP POP PUSH2 0x428 JUMP JUMPDEST PUSH2 0xA58 PUSH1 0x0 DUP7 DUP7 PUSH2 0xB2B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP2 MSTORE SWAP12 SWAP1 SWAP11 POP SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x6D757374206F76657272696465 PUSH1 0x98 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x830 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0xB0F DUP7 DUP7 PUSH2 0xB63 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xB1F DUP3 DUP3 PUSH2 0xBB0 JUMP JUMPDEST POP SWAP1 SWAP2 POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xD0 DUP3 PUSH6 0xFFFFFFFFFFFF AND SWAP1 SHL PUSH1 0xA0 DUP5 PUSH6 0xFFFFFFFFFFFF AND SWAP1 SHL DUP6 PUSH2 0xB53 JUMPI PUSH1 0x0 PUSH2 0xB56 JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH1 0xFF AND OR OR SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 MLOAD PUSH1 0x41 SUB PUSH2 0xB9D JUMPI PUSH1 0x20 DUP5 ADD MLOAD PUSH1 0x40 DUP6 ADD MLOAD PUSH1 0x60 DUP7 ADD MLOAD PUSH1 0x0 BYTE PUSH2 0xB8F DUP9 DUP3 DUP6 DUP6 PUSH2 0xC6D JUMP JUMPDEST SWAP6 POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0xBA9 JUMP JUMPDEST POP POP DUP2 MLOAD PUSH1 0x0 SWAP2 POP PUSH1 0x2 SWAP1 JUMPDEST SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xBC4 JUMPI PUSH2 0xBC4 PUSH2 0x114A JUMP JUMPDEST SUB PUSH2 0xBCD JUMPI POP POP JUMP JUMPDEST PUSH1 0x1 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xBE1 JUMPI PUSH2 0xBE1 PUSH2 0x114A JUMP JUMPDEST SUB PUSH2 0xBFF JUMPI PUSH1 0x40 MLOAD PUSH4 0xF645EEDF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xC13 JUMPI PUSH2 0xC13 PUSH2 0x114A JUMP JUMPDEST SUB PUSH2 0xC34 JUMPI PUSH1 0x40 MLOAD PUSH4 0xFCE698F7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x830 JUMP JUMPDEST PUSH1 0x3 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xC48 JUMPI PUSH2 0xC48 PUSH2 0x114A JUMP JUMPDEST SUB PUSH2 0xC69 JUMPI PUSH1 0x40 MLOAD PUSH4 0x35E2F383 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x830 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP5 GT ISZERO PUSH2 0xCA8 JUMPI POP PUSH1 0x0 SWAP2 POP PUSH1 0x3 SWAP1 POP DUP3 PUSH2 0xD32 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP11 SWAP1 MSTORE PUSH1 0xFF DUP10 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xCFC JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0xD28 JUMPI POP PUSH1 0x0 SWAP3 POP PUSH1 0x1 SWAP2 POP DUP3 SWAP1 POP PUSH2 0xD32 JUMP JUMPDEST SWAP3 POP PUSH1 0x0 SWAP2 POP DUP2 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 POP SWAP5 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xD62 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x842 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xD91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0xD9C DUP2 PUSH2 0xD69 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x120 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDBD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xDD8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xDEF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xDFB DUP7 DUP3 DUP8 ADD PUSH2 0xDAA JUMP JUMPDEST SWAP7 PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP7 POP PUSH1 0x40 SWAP1 SWAP6 ADD CALLDATALOAD SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP2 MSTORE PUSH1 0x0 DUP4 MLOAD DUP1 PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xE3F JUMPI PUSH1 0x20 DUP2 DUP8 ADD DUP2 ADD MLOAD PUSH1 0x60 DUP7 DUP5 ADD ADD MSTORE ADD PUSH2 0xE22 JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 DUP3 DUP6 ADD ADD MSTORE PUSH1 0x60 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP5 ADD ADD SWAP2 POP POP DUP3 PUSH1 0x20 DUP4 ADD MSTORE SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH6 0xFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xE7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xE96 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xEAD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xEB9 DUP7 DUP3 DUP8 ADD PUSH2 0xDAA JUMP JUMPDEST SWAP4 POP POP PUSH2 0xEC8 PUSH1 0x20 DUP6 ADD PUSH2 0xE66 JUMP JUMPDEST SWAP2 POP PUSH2 0xED6 PUSH1 0x40 DUP6 ADD PUSH2 0xE66 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0xEF1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF09 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xF21 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x80 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xF40 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH1 0x3 DUP2 LT PUSH2 0xF4F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF6B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xF77 DUP9 DUP3 DUP10 ADD PUSH2 0xEDF JUMP JUMPDEST SWAP7 SWAP10 SWAP1 SWAP9 POP SWAP6 SWAP7 PUSH1 0x40 DUP2 ADD CALLDATALOAD SWAP7 PUSH1 0x60 SWAP1 SWAP2 ADD CALLDATALOAD SWAP6 POP SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xFA5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xD62 DUP2 PUSH2 0xD69 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x20 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xFC3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xFDA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xFE6 DUP6 DUP3 DUP7 ADD PUSH2 0xEDF JUMP JUMPDEST SWAP1 SWAP7 SWAP1 SWAP6 POP SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH6 0xFFFFFFFFFFFF DUP1 DUP8 AND DUP4 MSTORE DUP1 DUP7 AND PUSH1 0x20 DUP5 ADD MSTORE POP PUSH1 0x60 PUSH1 0x40 DUP4 ADD MSTORE DUP3 PUSH1 0x60 DUP4 ADD MSTORE DUP3 DUP5 PUSH1 0x80 DUP5 ADD CALLDATACOPY PUSH1 0x0 PUSH1 0x80 DUP5 DUP5 ADD ADD MSTORE PUSH1 0x80 PUSH1 0x1F NOT PUSH1 0x1F DUP6 ADD AND DUP4 ADD ADD SWAP1 POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1055 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1070 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xF21 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 DUP4 DUP3 CALLDATACOPY PUSH1 0x0 SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP6 DUP6 GT ISZERO PUSH2 0x10A5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 DUP7 GT ISZERO PUSH2 0x10B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP DUP3 ADD SWAP4 SWAP2 SWAP1 SWAP3 SUB SWAP2 POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x20 DUP4 LT ISZERO PUSH2 0xB25 JUMPI PUSH1 0x0 NOT PUSH1 0x20 DUP5 SWAP1 SUB PUSH1 0x3 SHL SHL AND SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x10F0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10F9 DUP4 PUSH2 0xE66 JUMP JUMPDEST SWAP2 POP PUSH2 0x1107 PUSH1 0x20 DUP5 ADD PUSH2 0xE66 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP1 DUP3 ADD DUP1 DUP3 GT ISZERO PUSH2 0xB25 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1143 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xB3 0xDE 0xE5 PUSH14 0x54C33E3D801B74EF60DFDBF85DC7 SLOAD DUP12 DUP6 0x2F 0xDA PUSH2 0x6BD SLOAD 0x22 EXTCODEHASH 0xBD 0xAF 0x2E PUSH5 0x736F6C6343 STOP ADDMOD OR STOP CALLER ", + "sourceMap": "1127:4362:54:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4651:140:14;;;;;;:::i;:::-;;:::i;:::-;;4255:171;;;;;;;;;;-1:-1:-1;4255:171:14;;;;;:::i;:::-;;:::i;1231:30:54:-;;;;;;;;;;-1:-1:-1;1231:30:54;;;;-1:-1:-1;;;;;1231:30:54;;;;;;-1:-1:-1;;;;;939:32:84;;;921:51;;909:2;894:18;1231:30:54;;;;;;;;1428:321:14;;;;;;;;;;-1:-1:-1;1428:321:14;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;2064:1060:54:-;;;;;;;;;;-1:-1:-1;2064:1060:54;;;;;:::i;:::-;;:::i;:::-;;;3131:25:84;;;3119:2;3104:18;2064:1060:54;2985:177:84;2293:101:0;;;;;;;;;;;;;:::i;2225:278:14:-;;;;;;;;;;-1:-1:-1;2225:278:14;;;;;:::i;:::-;;:::i;1638:85:0:-;;;;;;;;;;-1:-1:-1;1684:7:0;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;5284:203:54;;;;;;;;;;-1:-1:-1;5284:203:54;;;;;:::i;:::-;;:::i;4881:397::-;;;;;;;;;;-1:-1:-1;4881:397:54;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;:::i;544:39:14:-;;;;;;;;;;;;;;;5144:83;;;;;;;;;;;;;:::i;5448:133::-;;;;;;;;;;-1:-1:-1;5448:133:14;;;;;:::i;:::-;;:::i;4874:111::-;;;;;;;;;;;;;:::i;3986:104::-;;;:::i;2543:215:0:-;;;;;;;;;;-1:-1:-1;2543:215:0;;;;;:::i;:::-;;:::i;4651:140:14:-;1531:13:0;:11;:13::i;:::-;4730:54:14::1;::::0;-1:-1:-1;;;4730:54:14;;6340:10:84;6328:23;;4730:54:14::1;::::0;::::1;6310:42:84::0;4730:10:14::1;-1:-1:-1::0;;;;;4730:19:14::1;::::0;::::1;::::0;4757:9:::1;::::0;6283:18:84;;4730:54:14::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;4651:140:::0;:::o;4255:171::-;1531:13:0;:11;:13::i;:::-;4373:46:14::1;::::0;-1:-1:-1;;;4373:46:14;;-1:-1:-1;;;;;6571:32:84;;;4373:46:14::1;::::0;::::1;6553:51:84::0;6620:18;;;6613:34;;;4373:10:14::1;:21;::::0;::::1;::::0;6526:18:84;;4373:46:14::1;;;;;;;;;;;;;;;;;::::0;::::1;1428:321:::0;1592:20;1614:22;1648:24;:22;:24::i;:::-;1689:53;1714:6;1722:10;1734:7;1689:24;:53::i;:::-;1682:60;;;;1428:321;;;;;;;:::o;2064:1060:54:-;2207:7;854:20:21;;;2464:12:54;;;;2508:15;;;;854:20:21;2508:15:54;:::i;:::-;2498:26;;;;;;;:::i;:::-;;;;;;;;;2556:15;;;;:6;:15;:::i;:::-;2546:26;;;;;;;:::i;:::-;;;;;;;;;2594:23;;;;2709:56;;;;2594:6;2709:56;:::i;:::-;:111;;490:2:21;;372;;2709:111:54;:::i;:::-;2672:174;;;:::i;:::-;2404:699;;;-1:-1:-1;;;;;8565:15:84;;;2404:699:54;;;8547:34:84;8597:18;;8590:34;;;;8640:18;;;8633:34;;;;8683:18;;;8676:34;2890:25:54;8726:19:84;;;8719:35;;;;2937:14:54;8770:19:84;;;8763:35;;;;2890:25:54;;;8814:19:84;;;8807:35;2937:14:54;;;8858:19:84;;;8851:35;2973:13:54;8902:19:84;;;8895:35;3016:4:54;8946:19:84;;;8939:44;9002:14;9053:16;;;9032:19;;;9025:45;9107:16;;9086:19;;;9079:45;8481:19;;2404:699:54;;;;;;;;;;;;2377:740;;;;;;2358:759;;;2064:1060;;;;;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2225:278:14:-;2402:24;:22;:24::i;:::-;2436:60;2444:4;2450:7;;2459:13;2474:21;2436:7;:60::i;:::-;2225:278;;;;;:::o;5284:203:54:-;1531:13:0;:11;:13::i;:::-;5385:15:54::1;:37:::0;;-1:-1:-1;;;;;;5385:37:54::1;-1:-1:-1::0;;;;;5385:37:54;::::1;::::0;;::::1;::::0;;;5437:43:::1;::::0;921:51:84;;;5437:43:54::1;::::0;909:2:84;894:18;5437:43:54::1;;;;;;;5284:203:::0;:::o;4881:397::-;5004:17;;5042:24;5004:17;5133:41;:16;490:2:21;5133:16:54;;:41;:::i;:::-;5109:105;;;;;;;:::i;:::-;5082:132;;-1:-1:-1;5082:132:54;-1:-1:-1;5236:16:54;;1390:27;490:2:21;1415::54;1390:27;:::i;:::-;5236:35;;;;;:::i;:::-;4881:397;;;;-1:-1:-1;5224:47:54;-1:-1:-1;;;4881:397:54:o;5144:83:14:-;1531:13:0;:11;:13::i;:::-;5196:10:14::1;-1:-1:-1::0;;;;;5196:22:14::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;5144:83::o:0;5448:133::-;1531:13:0;:11;:13::i;:::-;5533:41:14::1;::::0;-1:-1:-1;;;5533:41:14;;-1:-1:-1;;;;;939:32:84;;;5533:41:14::1;::::0;::::1;921:51:84::0;5533:10:14::1;:24;::::0;::::1;::::0;894:18:84;;5533:41:14::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;4874:111:::0;4943:35;;-1:-1:-1;;;4943:35:14;;4972:4;4943:35;;;921:51:84;4917:7:14;;4943:10;-1:-1:-1;;;;;4943:20:14;;;;894:18:84;;4943:35:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4936:42;;4874:111;:::o;3986:104::-;4030:53;;-1:-1:-1;;;4030:53:14;;4077:4;4030:53;;;921:51:84;4030:10:14;-1:-1:-1;;;;;4030:20:14;;;;4058:9;;894:18:84;;4030:53:14;;;;;;;;;;;;;;;;;;;2543:215:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;921:51:84::0;894:18;;2672:31:0::1;;;;;;;;2623:91;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:5;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:5;1901:40:0;;;921:51:84;894:18;;1901:40:0;775:203:84;5660:135:14;5729:10;-1:-1:-1;;;;;5751:10:14;5729:33;;5721:67;;;;-1:-1:-1;;;5721:67:14;;10238:2:84;5721:67:14;;;10220:21:84;10277:2;10257:18;;;10250:30;-1:-1:-1;;;10296:18:84;;;10289:51;10357:18;;5721:67:14;10036:345:84;3464:1411:54;3678:20;3700:22;;;3842:24;3700:22;3879:46;3901:23;;;;:6;:23;:::i;3879:46::-;3766:159;;-1:-1:-1;3766:159:54;;-1:-1:-1;3766:159:54;-1:-1:-1;3766:159:54;-1:-1:-1;4179:2:54;4159:22;;;:48;;-1:-1:-1;4205:2:54;4185:22;;4159:48;4138:159;;;;;-1:-1:-1;;;4138:159:54;;10588:2:84;4138:159:54;;;10570:21:84;10607:18;;;10600:30;;;;10666:34;10646:18;;;10639:62;10737:34;10717:18;;;10710:62;10789:19;;4138:159:54;10386:428:84;4138:159:54;4307:12;4322:102;4375:39;4383:6;4391:10;4403;4375:7;:39::i;:::-;1403:34:9;1298:14;1390:48;;;1499:4;1492:25;;;;1597:4;1581:21;;;1222:460;4322:102:54;4307:117;;4532:30;4546:4;4552:9;;4532:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4532:13:54;;-1:-1:-1;;;4532:30:54:i;:::-;4513:15;;-1:-1:-1;;;;;4513:15:54;;;:49;;;4509:142;;4590:49;4610:4;4616:10;4628;4590:19;:49::i;:::-;4578:62;;;;;;;;;;;;;;;;;;;;;;;;4509:142;4817:50;4837:5;4844:10;4856;4817:19;:50::i;:::-;4805:63;;;;;;;;;-1:-1:-1;4805:63:54;;;;;-1:-1:-1;3464:1411:54;-1:-1:-1;;;;;;;;;3464:1411:54:o;2912:187:0:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;3507:378:14:-;3855:23;;-1:-1:-1;;;3855:23:14;;11021:2:84;3855:23:14;;;11003:21:84;11060:2;11040:18;;;11033:30;-1:-1:-1;;;11079:18:84;;;11072:43;11132:18;;3855:23:14;10819:337:84;3702:255:8;3780:7;3800:17;3819:18;3839:16;3859:27;3870:4;3876:9;3859:10;:27::i;:::-;3799:87;;;;;;3896:28;3908:5;3915:8;3896:11;:28::i;:::-;-1:-1:-1;3941:9:8;;-1:-1:-1;;3702:255:8;;;;;:::o;2448:248:17:-;2559:7;2683:8;2667:10;2659:19;;:33;;2643:3;2628:10;2620:19;;:26;;2590:9;:17;;2606:1;2590:17;;;2602:1;2590:17;2589:58;;;:104;;2448:248;-1:-1:-1;;;;2448:248:17:o;2129:766:8:-;2210:7;2219:12;2233:7;2256:9;:16;2276:2;2256:22;2252:637;;2592:4;2577:20;;2571:27;2641:4;2626:20;;2620:27;2698:4;2683:20;;2677:27;2294:9;2669:36;2739:25;2750:4;2669:36;2571:27;2620;2739:10;:25::i;:::-;2732:32;;;;;;;;;;;2252:637;-1:-1:-1;;2860:16:8;;2811:1;;-1:-1:-1;2815:35:8;;2252:637;2129:766;;;;;:::o;7196:532::-;7291:20;7282:5;:29;;;;;;;;:::i;:::-;;7278:444;;7196:532;;:::o;7278:444::-;7387:29;7378:5;:38;;;;;;;;:::i;:::-;;7374:348;;7439:23;;-1:-1:-1;;;7439:23:8;;;;;;;;;;;7374:348;7492:35;7483:5;:44;;;;;;;;:::i;:::-;;7479:243;;7550:46;;-1:-1:-1;;;7550:46:8;;;;;3131:25:84;;;3104:18;;7550:46:8;2985:177:84;7479:243:8;7626:30;7617:5;:39;;;;;;;;:::i;:::-;;7613:109;;7679:32;;-1:-1:-1;;;7679:32:8;;;;;3131:25:84;;;3104:18;;7679:32:8;2985:177:84;7613:109:8;7196:532;;:::o;5140:1530::-;5266:7;;;6199:66;6186:79;;6182:164;;;-1:-1:-1;6297:1:8;;-1:-1:-1;6301:30:8;;-1:-1:-1;6333:1:8;6281:54;;6182:164;6457:24;;;6440:14;6457:24;;;;;;;;;11520:25:84;;;11593:4;11581:17;;11561:18;;;11554:45;;;;11615:18;;;11608:34;;;11658:18;;;11651:34;;;6457:24:8;;11492:19:84;;6457:24:8;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6457:24:8;;-1:-1:-1;;6457:24:8;;;-1:-1:-1;;;;;;;6495:20:8;;6491:113;;-1:-1:-1;6547:1:8;;-1:-1:-1;6551:29:8;;-1:-1:-1;6547:1:8;;-1:-1:-1;6531:62:8;;6491:113;6622:6;-1:-1:-1;6630:20:8;;-1:-1:-1;6630:20:8;;-1:-1:-1;5140:1530:8;;;;;;;;;:::o;14:276:84:-;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;230:10;223:5;219:22;212:5;209:33;199:61;;256:1;253;246:12;199:61;279:5;14:276;-1:-1:-1;;;14:276:84:o;295:139::-;-1:-1:-1;;;;;378:31:84;;368:42;;358:70;;424:1;421;414:12;439:331;515:6;523;576:2;564:9;555:7;551:23;547:32;544:52;;;592:1;589;582:12;544:52;631:9;618:23;650:39;683:5;650:39;:::i;:::-;708:5;760:2;745:18;;;;732:32;;-1:-1:-1;;;439:331:84:o;983:168::-;1055:5;1100:3;1091:6;1086:3;1082:16;1078:26;1075:46;;;1117:1;1114;1107:12;1075:46;-1:-1:-1;1139:6:84;983:168;-1:-1:-1;983:168:84:o;1156:516::-;1272:6;1280;1288;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1397:9;1384:23;1430:18;1422:6;1419:30;1416:50;;;1462:1;1459;1452:12;1416:50;1485:79;1556:7;1547:6;1536:9;1532:22;1485:79;:::i;:::-;1475:89;1611:2;1596:18;;1583:32;;-1:-1:-1;1662:2:84;1647:18;;;1634:32;;1156:516;-1:-1:-1;;;;1156:516:84:o;1677:602::-;1852:2;1841:9;1834:21;1815:4;1884:6;1878:13;1927:6;1922:2;1911:9;1907:18;1900:34;1952:1;1962:144;1976:6;1973:1;1970:13;1962:144;;;2089:4;2073:14;;;2069:25;;2063:32;2058:2;2039:17;;;2035:26;2028:68;1991:12;1962:144;;;1966:3;2155:1;2150:2;2141:6;2130:9;2126:22;2122:31;2115:42;2225:2;2218;2214:7;2209:2;2201:6;2197:15;2193:29;2182:9;2178:45;2174:54;2166:62;;;2266:6;2259:4;2248:9;2244:20;2237:36;1677:602;;;;;:::o;2284:167::-;2351:20;;2411:14;2400:26;;2390:37;;2380:65;;2441:1;2438;2431:12;2380:65;2284:167;;;:::o;2456:524::-;2570:6;2578;2586;2639:2;2627:9;2618:7;2614:23;2610:32;2607:52;;;2655:1;2652;2645:12;2607:52;2695:9;2682:23;2728:18;2720:6;2717:30;2714:50;;;2760:1;2757;2750:12;2714:50;2783:79;2854:7;2845:6;2834:9;2830:22;2783:79;:::i;:::-;2773:89;;;2881:37;2914:2;2903:9;2899:18;2881:37;:::i;:::-;2871:47;;2937:37;2970:2;2959:9;2955:18;2937:37;:::i;:::-;2927:47;;2456:524;;;;;:::o;3167:347::-;3218:8;3228:6;3282:3;3275:4;3267:6;3263:17;3259:27;3249:55;;3300:1;3297;3290:12;3249:55;-1:-1:-1;3323:20:84;;3366:18;3355:30;;3352:50;;;3398:1;3395;3388:12;3352:50;3435:4;3427:6;3423:17;3411:29;;3487:3;3480:4;3471:6;3463;3459:19;3455:30;3452:39;3449:59;;;3504:1;3501;3494:12;3449:59;3167:347;;;;;:::o;3519:705::-;3631:6;3639;3647;3655;3663;3716:3;3704:9;3695:7;3691:23;3687:33;3684:53;;;3733:1;3730;3723:12;3684:53;3772:9;3759:23;3811:1;3804:5;3801:12;3791:40;;3827:1;3824;3817:12;3791:40;3850:5;-1:-1:-1;3906:2:84;3891:18;;3878:32;3933:18;3922:30;;3919:50;;;3965:1;3962;3955:12;3919:50;4004:58;4054:7;4045:6;4034:9;4030:22;4004:58;:::i;:::-;3519:705;;4081:8;;-1:-1:-1;3978:84:84;;4163:2;4148:18;;4135:32;;4214:2;4199:18;;;4186:32;;-1:-1:-1;3519:705:84;-1:-1:-1;;;;3519:705:84:o;4229:255::-;4288:6;4341:2;4329:9;4320:7;4316:23;4312:32;4309:52;;;4357:1;4354;4347:12;4309:52;4396:9;4383:23;4415:39;4448:5;4415:39;:::i;4489:409::-;4559:6;4567;4620:2;4608:9;4599:7;4595:23;4591:32;4588:52;;;4636:1;4633;4626:12;4588:52;4676:9;4663:23;4709:18;4701:6;4698:30;4695:50;;;4741:1;4738;4731:12;4695:50;4780:58;4830:7;4821:6;4810:9;4806:22;4780:58;:::i;:::-;4857:8;;4754:84;;-1:-1:-1;4489:409:84;-1:-1:-1;;;;4489:409:84:o;4903:580::-;5075:4;5104:14;5157:2;5149:6;5145:15;5134:9;5127:34;5209:2;5201:6;5197:15;5192:2;5181:9;5177:18;5170:43;;5249:2;5244;5233:9;5229:18;5222:30;5288:6;5283:2;5272:9;5268:18;5261:34;5346:6;5338;5332:3;5321:9;5317:19;5304:49;5403:1;5397:3;5388:6;5377:9;5373:22;5369:32;5362:43;5473:3;5466:2;5462:7;5457:2;5449:6;5445:15;5441:29;5430:9;5426:45;5422:55;5414:63;;4903:580;;;;;;;:::o;6658:521::-;6735:4;6741:6;6801:11;6788:25;6895:2;6891:7;6880:8;6864:14;6860:29;6856:43;6836:18;6832:68;6822:96;;6914:1;6911;6904:12;6822:96;6941:33;;6993:20;;;-1:-1:-1;7036:18:84;7025:30;;7022:50;;;7068:1;7065;7058:12;7022:50;7101:4;7089:17;;-1:-1:-1;7132:14:84;7128:27;;;7118:38;;7115:58;;;7169:1;7166;7159:12;7184:271;7367:6;7359;7354:3;7341:33;7323:3;7393:16;;7418:13;;;7393:16;7184:271;-1:-1:-1;7184:271:84:o;7460:331::-;7565:9;7576;7618:8;7606:10;7603:24;7600:44;;;7640:1;7637;7630:12;7600:44;7669:6;7659:8;7656:20;7653:40;;;7689:1;7686;7679:12;7653:40;-1:-1:-1;;7715:23:84;;;7760:25;;;;;-1:-1:-1;7460:331:84:o;7796:255::-;7916:19;;7955:2;7947:11;;7944:101;;;-1:-1:-1;;8016:2:84;8012:12;;;8009:1;8005:20;8001:33;7990:45;7796:255;;;;:::o;9135:256::-;9201:6;9209;9262:2;9250:9;9241:7;9237:23;9233:32;9230:52;;;9278:1;9275;9268:12;9230:52;9301:28;9319:9;9301:28;:::i;:::-;9291:38;;9348:37;9381:2;9370:9;9366:18;9348:37;:::i;:::-;9338:47;;9135:256;;;;;:::o;9396:222::-;9461:9;;;9482:10;;;9479:133;;;9534:10;9529:3;9525:20;9522:1;9515:31;9569:4;9566:1;9559:15;9597:4;9594:1;9587:15;9847:184;9917:6;9970:2;9958:9;9949:7;9945:23;9941:32;9938:52;;;9986:1;9983;9976:12;9938:52;-1:-1:-1;10009:16:84;;9847:184;-1:-1:-1;9847:184:84:o;11161:127::-;11222:10;11217:3;11213:20;11210:1;11203:31;11253:4;11250:1;11243:15;11277:4;11274:1;11267:15" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "900400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addStake(uint32)": "infinite", + "deposit()": "infinite", + "entryPoint()": "infinite", + "getDeposit()": "infinite", + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes),uint48,uint48)": "infinite", + "owner()": "2409", + "parsePaymasterAndData(bytes)": "infinite", + "postOp(uint8,bytes,uint256,uint256)": "infinite", + "renounceOwnership()": "infinite", + "transferOwnership(address)": "infinite", + "unlockStake()": "infinite", + "updateVerifyingSigner(address)": "27805", + "validatePaymasterUserOp((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes),bytes32,uint256)": "infinite", + "verifyingSigner()": "2394", + "withdrawStake(address)": "infinite", + "withdrawTo(address,uint256)": "infinite" + }, + "internal": { + "_validatePaymasterUserOp(struct PackedUserOperation calldata,bytes32,uint256)": "infinite" + } + }, + "methodIdentifiers": { + "addStake(uint32)": "0396cb60", + "deposit()": "d0e30db0", + "entryPoint()": "b0d691fe", + "getDeposit()": "c399ec88", + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes),uint48,uint48)": "5829c5f5", + "owner()": "8da5cb5b", + "parsePaymasterAndData(bytes)": "94d4ad60", + "postOp(uint8,bytes,uint256,uint256)": "7c627b21", + "renounceOwnership()": "715018a6", + "transferOwnership(address)": "f2fde38b", + "unlockStake()": "bb9fe6bf", + "updateVerifyingSigner(address)": "93b94121", + "validatePaymasterUserOp((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes),bytes32,uint256)": "52b7512c", + "verifyingSigner()": "23d9ac9b", + "withdrawStake(address)": "c23a5cea", + "withdrawTo(address,uint256)": "205c2878" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "solcInput": "{\n \"language\": \"Solidity\",\n \"sources\": {\n \"@openzeppelin/contracts/access/Ownable.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\"\n },\n \"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard ERC20 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\\n */\\ninterface IERC20Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC20InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC20InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC20InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC20InvalidSpender(address spender);\\n}\\n\\n/**\\n * @dev Standard ERC721 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\\n */\\ninterface IERC721Errors {\\n /**\\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\\n * Used in balance queries.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721InvalidOwner(address owner);\\n\\n /**\\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721NonexistentToken(uint256 tokenId);\\n\\n /**\\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param tokenId Identifier number of a token.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC721InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC721InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC721InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC721InvalidOperator(address operator);\\n}\\n\\n/**\\n * @dev Standard ERC1155 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\\n */\\ninterface IERC1155Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC1155InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC1155InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC1155MissingApprovalForAll(address operator, address owner);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC1155InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC1155InvalidOperator(address operator);\\n\\n /**\\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\\n * Used in batch transfers.\\n * @param idsLength Length of the array of token identifiers\\n * @param valuesLength Length of the array of token amounts\\n */\\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC20/ERC20.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"./extensions/IERC20Metadata.sol\\\";\\nimport {Context} from \\\"../../utils/Context.sol\\\";\\nimport {IERC20Errors} from \\\"../../interfaces/draft-IERC6093.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n */\\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\\n mapping(address account => uint256) private _balances;\\n\\n mapping(address account => mapping(address spender => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `value`.\\n */\\n function transfer(address to, uint256 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, value);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `value`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `value`.\\n */\\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, value);\\n _transfer(from, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _transfer(address from, address to, uint256 value) internal {\\n if (from == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n if (to == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(from, to, value);\\n }\\n\\n /**\\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\\n * this function.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _update(address from, address to, uint256 value) internal virtual {\\n if (from == address(0)) {\\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\\n _totalSupply += value;\\n } else {\\n uint256 fromBalance = _balances[from];\\n if (fromBalance < value) {\\n revert ERC20InsufficientBalance(from, fromBalance, value);\\n }\\n unchecked {\\n // Overflow not possible: value <= fromBalance <= totalSupply.\\n _balances[from] = fromBalance - value;\\n }\\n }\\n\\n if (to == address(0)) {\\n unchecked {\\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\\n _totalSupply -= value;\\n }\\n } else {\\n unchecked {\\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\\n _balances[to] += value;\\n }\\n }\\n\\n emit Transfer(from, to, value);\\n }\\n\\n /**\\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\\n * Relies on the `_update` mechanism\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _mint(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(address(0), account, value);\\n }\\n\\n /**\\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\\n * Relies on the `_update` mechanism.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead\\n */\\n function _burn(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n _update(account, address(0), value);\\n }\\n\\n /**\\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n *\\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\\n */\\n function _approve(address owner, address spender, uint256 value) internal {\\n _approve(owner, spender, value, true);\\n }\\n\\n /**\\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\\n *\\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\\n * `Approval` event during `transferFrom` operations.\\n *\\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\\n * true using the following override:\\n * ```\\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\\n * super._approve(owner, spender, value, true);\\n * }\\n * ```\\n *\\n * Requirements are the same as {_approve}.\\n */\\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\\n if (owner == address(0)) {\\n revert ERC20InvalidApprover(address(0));\\n }\\n if (spender == address(0)) {\\n revert ERC20InvalidSpender(address(0));\\n }\\n _allowances[owner][spender] = value;\\n if (emitEvent) {\\n emit Approval(owner, spender, value);\\n }\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\\n *\\n * Does not update the allowance value in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Does not emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n if (currentAllowance < value) {\\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\\n }\\n unchecked {\\n _approve(owner, spender, currentAllowance - value, false);\\n }\\n }\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\"\n },\n \"@openzeppelin/contracts/token/ERC20/IERC20.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/Context.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\"\n },\n \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/introspection/ERC165.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/introspection/IERC165.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/math/Math.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\"\n },\n \"@openzeppelin/contracts/utils/math/SignedMath.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\"\n },\n \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.20;\\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 /**\\n * @dev Unauthorized reentrant call.\\n */\\n error ReentrancyGuardReentrantCall();\\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 if (_status == ENTERED) {\\n revert ReentrancyGuardReentrantCall();\\n }\\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\"\n },\n \"@openzeppelin/contracts/utils/Strings.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\"\n },\n \"account-abstraction/contracts/core/BasePaymaster.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\"\n },\n \"account-abstraction/contracts/core/EntryPoint.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/IAccount.sol\\\";\\nimport \\\"../interfaces/IAccountExecute.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\n\\nimport \\\"../utils/Exec.sol\\\";\\nimport \\\"./StakeManager.sol\\\";\\nimport \\\"./SenderCreator.sol\\\";\\nimport \\\"./Helpers.sol\\\";\\nimport \\\"./NonceManager.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\\\";\\n\\n/*\\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\\n * Only one instance required on each chain.\\n */\\n\\n/// @custom:security-contact https://bounty.ethereum.org\\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\\n\\n using UserOperationLib for PackedUserOperation;\\n\\n SenderCreator private immutable _senderCreator = new SenderCreator();\\n\\n function senderCreator() internal view virtual returns (SenderCreator) {\\n return _senderCreator;\\n }\\n\\n //compensate for innerHandleOps' emit message and deposit refund.\\n // allow some slack for future gas price changes.\\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\\n\\n // Marker for inner call revert on out of gas\\n bytes32 private constant INNER_OUT_OF_GAS = hex\\\"deaddead\\\";\\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\\\"deadaa51\\\";\\n\\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\\n uint256 private constant PENALTY_PERCENT = 10;\\n\\n /// @inheritdoc IERC165\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n // note: solidity \\\"type(IEntryPoint).interfaceId\\\" is without inherited methods but we want to check everything\\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\\n interfaceId == type(IEntryPoint).interfaceId ||\\n interfaceId == type(IStakeManager).interfaceId ||\\n interfaceId == type(INonceManager).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\\n * @param beneficiary - The address to receive the fees.\\n * @param amount - Amount to transfer.\\n */\\n function _compensate(address payable beneficiary, uint256 amount) internal {\\n require(beneficiary != address(0), \\\"AA90 invalid beneficiary\\\");\\n (bool success, ) = beneficiary.call{value: amount}(\\\"\\\");\\n require(success, \\\"AA91 failed send to beneficiary\\\");\\n }\\n\\n /**\\n * Execute a user operation.\\n * @param opIndex - Index into the opInfo array.\\n * @param userOp - The userOp to execute.\\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\\n * @return collected - The total amount this userOp paid.\\n */\\n function _executeUserOp(\\n uint256 opIndex,\\n PackedUserOperation calldata userOp,\\n UserOpInfo memory opInfo\\n )\\n internal\\n returns\\n (uint256 collected) {\\n uint256 preGas = gasleft();\\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\\n bool success;\\n {\\n uint256 saveFreePtr;\\n assembly (\\\"memory-safe\\\") {\\n saveFreePtr := mload(0x40)\\n }\\n bytes calldata callData = userOp.callData;\\n bytes memory innerCall;\\n bytes4 methodSig;\\n assembly {\\n let len := callData.length\\n if gt(len, 3) {\\n methodSig := calldataload(callData.offset)\\n }\\n }\\n if (methodSig == IAccountExecute.executeUserOp.selector) {\\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\\n } else\\n {\\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\\n }\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\\n collected := mload(0)\\n mstore(0x40, saveFreePtr)\\n }\\n }\\n if (!success) {\\n bytes32 innerRevertCode;\\n assembly (\\\"memory-safe\\\") {\\n let len := returndatasize()\\n if eq(32,len) {\\n returndatacopy(0, 0, 32)\\n innerRevertCode := mload(0)\\n }\\n }\\n if (innerRevertCode == INNER_OUT_OF_GAS) {\\n // handleOps was called with gas limit too low. abort entire bundle.\\n //can only be caused by bundler (leaving not enough gas for inner call)\\n revert FailedOp(opIndex, \\\"AA95 out of gas\\\");\\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\\n // innerCall reverted on prefund too low. treat entire prefund as \\\"gas cost\\\"\\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\\n uint256 actualGasCost = opInfo.prefund;\\n emitPrefundTooLow(opInfo);\\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\\n collected = actualGasCost;\\n } else {\\n emit PostOpRevertReason(\\n opInfo.userOpHash,\\n opInfo.mUserOp.sender,\\n opInfo.mUserOp.nonce,\\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\\n );\\n\\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\\n collected = _postExecution(\\n IPaymaster.PostOpMode.postOpReverted,\\n opInfo,\\n context,\\n actualGas\\n );\\n }\\n }\\n }\\n\\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\\n emit UserOperationEvent(\\n opInfo.userOpHash,\\n opInfo.mUserOp.sender,\\n opInfo.mUserOp.paymaster,\\n opInfo.mUserOp.nonce,\\n success,\\n actualGasCost,\\n actualGas\\n );\\n }\\n\\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\\n emit UserOperationPrefundTooLow(\\n opInfo.userOpHash,\\n opInfo.mUserOp.sender,\\n opInfo.mUserOp.nonce\\n );\\n }\\n\\n /// @inheritdoc IEntryPoint\\n function handleOps(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) public nonReentrant {\\n uint256 opslen = ops.length;\\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\\n\\n unchecked {\\n for (uint256 i = 0; i < opslen; i++) {\\n UserOpInfo memory opInfo = opInfos[i];\\n (\\n uint256 validationData,\\n uint256 pmValidationData\\n ) = _validatePrepayment(i, ops[i], opInfo);\\n _validateAccountAndPaymasterValidationData(\\n i,\\n validationData,\\n pmValidationData,\\n address(0)\\n );\\n }\\n\\n uint256 collected = 0;\\n emit BeforeExecution();\\n\\n for (uint256 i = 0; i < opslen; i++) {\\n collected += _executeUserOp(i, ops[i], opInfos[i]);\\n }\\n\\n _compensate(beneficiary, collected);\\n }\\n }\\n\\n /// @inheritdoc IEntryPoint\\n function handleAggregatedOps(\\n UserOpsPerAggregator[] calldata opsPerAggregator,\\n address payable beneficiary\\n ) public nonReentrant {\\n\\n uint256 opasLen = opsPerAggregator.length;\\n uint256 totalOps = 0;\\n for (uint256 i = 0; i < opasLen; i++) {\\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\\n PackedUserOperation[] calldata ops = opa.userOps;\\n IAggregator aggregator = opa.aggregator;\\n\\n //address(1) is special marker of \\\"signature error\\\"\\n require(\\n address(aggregator) != address(1),\\n \\\"AA96 invalid aggregator\\\"\\n );\\n\\n if (address(aggregator) != address(0)) {\\n // solhint-disable-next-line no-empty-blocks\\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\\n revert SignatureValidationFailed(address(aggregator));\\n }\\n }\\n\\n totalOps += ops.length;\\n }\\n\\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\\n\\n uint256 opIndex = 0;\\n for (uint256 a = 0; a < opasLen; a++) {\\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\\n PackedUserOperation[] calldata ops = opa.userOps;\\n IAggregator aggregator = opa.aggregator;\\n\\n uint256 opslen = ops.length;\\n for (uint256 i = 0; i < opslen; i++) {\\n UserOpInfo memory opInfo = opInfos[opIndex];\\n (\\n uint256 validationData,\\n uint256 paymasterValidationData\\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\\n _validateAccountAndPaymasterValidationData(\\n i,\\n validationData,\\n paymasterValidationData,\\n address(aggregator)\\n );\\n opIndex++;\\n }\\n }\\n\\n emit BeforeExecution();\\n\\n uint256 collected = 0;\\n opIndex = 0;\\n for (uint256 a = 0; a < opasLen; a++) {\\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\\n emit SignatureAggregatorChanged(address(opa.aggregator));\\n PackedUserOperation[] calldata ops = opa.userOps;\\n uint256 opslen = ops.length;\\n\\n for (uint256 i = 0; i < opslen; i++) {\\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\\n opIndex++;\\n }\\n }\\n emit SignatureAggregatorChanged(address(0));\\n\\n _compensate(beneficiary, collected);\\n }\\n\\n /**\\n * A memory copy of UserOp static fields only.\\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\\n */\\n struct MemoryUserOp {\\n address sender;\\n uint256 nonce;\\n uint256 verificationGasLimit;\\n uint256 callGasLimit;\\n uint256 paymasterVerificationGasLimit;\\n uint256 paymasterPostOpGasLimit;\\n uint256 preVerificationGas;\\n address paymaster;\\n uint256 maxFeePerGas;\\n uint256 maxPriorityFeePerGas;\\n }\\n\\n struct UserOpInfo {\\n MemoryUserOp mUserOp;\\n bytes32 userOpHash;\\n uint256 prefund;\\n uint256 contextOffset;\\n uint256 preOpGas;\\n }\\n\\n /**\\n * Inner function to handle a UserOperation.\\n * Must be declared \\\"external\\\" to open a call context, but it can only be called by handleOps.\\n * @param callData - The callData to execute.\\n * @param opInfo - The UserOpInfo struct.\\n * @param context - The context bytes.\\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\\n */\\n function innerHandleOp(\\n bytes memory callData,\\n UserOpInfo memory opInfo,\\n bytes calldata context\\n ) external returns (uint256 actualGasCost) {\\n uint256 preGas = gasleft();\\n require(msg.sender == address(this), \\\"AA92 internal call only\\\");\\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\\n\\n uint256 callGasLimit = mUserOp.callGasLimit;\\n unchecked {\\n // handleOps was called with gas limit too low. abort entire bundle.\\n if (\\n gasleft() * 63 / 64 <\\n callGasLimit +\\n mUserOp.paymasterPostOpGasLimit +\\n INNER_GAS_OVERHEAD\\n ) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0, INNER_OUT_OF_GAS)\\n revert(0, 32)\\n }\\n }\\n }\\n\\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\\n if (callData.length > 0) {\\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\\n if (!success) {\\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\\n if (result.length > 0) {\\n emit UserOperationRevertReason(\\n opInfo.userOpHash,\\n mUserOp.sender,\\n mUserOp.nonce,\\n result\\n );\\n }\\n mode = IPaymaster.PostOpMode.opReverted;\\n }\\n }\\n\\n unchecked {\\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\\n return _postExecution(mode, opInfo, context, actualGas);\\n }\\n }\\n\\n /// @inheritdoc IEntryPoint\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) public view returns (bytes32) {\\n return\\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\\n }\\n\\n /**\\n * Copy general fields from userOp into the memory opInfo structure.\\n * @param userOp - The user operation.\\n * @param mUserOp - The memory user operation.\\n */\\n function _copyUserOpToMemory(\\n PackedUserOperation calldata userOp,\\n MemoryUserOp memory mUserOp\\n ) internal pure {\\n mUserOp.sender = userOp.sender;\\n mUserOp.nonce = userOp.nonce;\\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\\n mUserOp.preVerificationGas = userOp.preVerificationGas;\\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\\n bytes calldata paymasterAndData = userOp.paymasterAndData;\\n if (paymasterAndData.length > 0) {\\n require(\\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\\n \\\"AA93 invalid paymasterAndData\\\"\\n );\\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\\n } else {\\n mUserOp.paymaster = address(0);\\n mUserOp.paymasterVerificationGasLimit = 0;\\n mUserOp.paymasterPostOpGasLimit = 0;\\n }\\n }\\n\\n /**\\n * Get the required prefunded gas fee amount for an operation.\\n * @param mUserOp - The user operation in memory.\\n */\\n function _getRequiredPrefund(\\n MemoryUserOp memory mUserOp\\n ) internal pure returns (uint256 requiredPrefund) {\\n unchecked {\\n uint256 requiredGas = mUserOp.verificationGasLimit +\\n mUserOp.callGasLimit +\\n mUserOp.paymasterVerificationGasLimit +\\n mUserOp.paymasterPostOpGasLimit +\\n mUserOp.preVerificationGas;\\n\\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\\n }\\n }\\n\\n /**\\n * Create sender smart contract account if init code is provided.\\n * @param opIndex - The operation index.\\n * @param opInfo - The operation info.\\n * @param initCode - The init code for the smart contract account.\\n */\\n function _createSenderIfNeeded(\\n uint256 opIndex,\\n UserOpInfo memory opInfo,\\n bytes calldata initCode\\n ) internal {\\n if (initCode.length != 0) {\\n address sender = opInfo.mUserOp.sender;\\n if (sender.code.length != 0)\\n revert FailedOp(opIndex, \\\"AA10 sender already constructed\\\");\\n address sender1 = senderCreator().createSender{\\n gas: opInfo.mUserOp.verificationGasLimit\\n }(initCode);\\n if (sender1 == address(0))\\n revert FailedOp(opIndex, \\\"AA13 initCode failed or OOG\\\");\\n if (sender1 != sender)\\n revert FailedOp(opIndex, \\\"AA14 initCode must return sender\\\");\\n if (sender1.code.length == 0)\\n revert FailedOp(opIndex, \\\"AA15 initCode must create sender\\\");\\n address factory = address(bytes20(initCode[0:20]));\\n emit AccountDeployed(\\n opInfo.userOpHash,\\n sender,\\n factory,\\n opInfo.mUserOp.paymaster\\n );\\n }\\n }\\n\\n /// @inheritdoc IEntryPoint\\n function getSenderAddress(bytes calldata initCode) public {\\n address sender = senderCreator().createSender(initCode);\\n revert SenderAddressResult(sender);\\n }\\n\\n /**\\n * Call account.validateUserOp.\\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\\n * Decrement account's deposit if needed.\\n * @param opIndex - The operation index.\\n * @param op - The user operation.\\n * @param opInfo - The operation info.\\n * @param requiredPrefund - The required prefund amount.\\n */\\n function _validateAccountPrepayment(\\n uint256 opIndex,\\n PackedUserOperation calldata op,\\n UserOpInfo memory opInfo,\\n uint256 requiredPrefund,\\n uint256 verificationGasLimit\\n )\\n internal\\n returns (\\n uint256 validationData\\n )\\n {\\n unchecked {\\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\\n address sender = mUserOp.sender;\\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\\n address paymaster = mUserOp.paymaster;\\n uint256 missingAccountFunds = 0;\\n if (paymaster == address(0)) {\\n uint256 bal = balanceOf(sender);\\n missingAccountFunds = bal > requiredPrefund\\n ? 0\\n : requiredPrefund - bal;\\n }\\n try\\n IAccount(sender).validateUserOp{\\n gas: verificationGasLimit\\n }(op, opInfo.userOpHash, missingAccountFunds)\\n returns (uint256 _validationData) {\\n validationData = _validationData;\\n } catch {\\n revert FailedOpWithRevert(opIndex, \\\"AA23 reverted\\\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\\n }\\n if (paymaster == address(0)) {\\n DepositInfo storage senderInfo = deposits[sender];\\n uint256 deposit = senderInfo.deposit;\\n if (requiredPrefund > deposit) {\\n revert FailedOp(opIndex, \\\"AA21 didn't pay prefund\\\");\\n }\\n senderInfo.deposit = deposit - requiredPrefund;\\n }\\n }\\n }\\n\\n /**\\n * In case the request has a paymaster:\\n * - Validate paymaster has enough deposit.\\n * - Call paymaster.validatePaymasterUserOp.\\n * - Revert with proper FailedOp in case paymaster reverts.\\n * - Decrement paymaster's deposit.\\n * @param opIndex - The operation index.\\n * @param op - The user operation.\\n * @param opInfo - The operation info.\\n * @param requiredPreFund - The required prefund amount.\\n */\\n function _validatePaymasterPrepayment(\\n uint256 opIndex,\\n PackedUserOperation calldata op,\\n UserOpInfo memory opInfo,\\n uint256 requiredPreFund\\n ) internal returns (bytes memory context, uint256 validationData) {\\n unchecked {\\n uint256 preGas = gasleft();\\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\\n address paymaster = mUserOp.paymaster;\\n DepositInfo storage paymasterInfo = deposits[paymaster];\\n uint256 deposit = paymasterInfo.deposit;\\n if (deposit < requiredPreFund) {\\n revert FailedOp(opIndex, \\\"AA31 paymaster deposit too low\\\");\\n }\\n paymasterInfo.deposit = deposit - requiredPreFund;\\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\\n try\\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\\n op,\\n opInfo.userOpHash,\\n requiredPreFund\\n )\\n returns (bytes memory _context, uint256 _validationData) {\\n context = _context;\\n validationData = _validationData;\\n } catch {\\n revert FailedOpWithRevert(opIndex, \\\"AA33 reverted\\\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\\n }\\n if (preGas - gasleft() > pmVerificationGasLimit) {\\n revert FailedOp(opIndex, \\\"AA36 over paymasterVerificationGasLimit\\\");\\n }\\n }\\n }\\n\\n /**\\n * Revert if either account validationData or paymaster validationData is expired.\\n * @param opIndex - The operation index.\\n * @param validationData - The account validationData.\\n * @param paymasterValidationData - The paymaster validationData.\\n * @param expectedAggregator - The expected aggregator.\\n */\\n function _validateAccountAndPaymasterValidationData(\\n uint256 opIndex,\\n uint256 validationData,\\n uint256 paymasterValidationData,\\n address expectedAggregator\\n ) internal view {\\n (address aggregator, bool outOfTimeRange) = _getValidationData(\\n validationData\\n );\\n if (expectedAggregator != aggregator) {\\n revert FailedOp(opIndex, \\\"AA24 signature error\\\");\\n }\\n if (outOfTimeRange) {\\n revert FailedOp(opIndex, \\\"AA22 expired or not due\\\");\\n }\\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\\n address pmAggregator;\\n (pmAggregator, outOfTimeRange) = _getValidationData(\\n paymasterValidationData\\n );\\n if (pmAggregator != address(0)) {\\n revert FailedOp(opIndex, \\\"AA34 signature error\\\");\\n }\\n if (outOfTimeRange) {\\n revert FailedOp(opIndex, \\\"AA32 paymaster expired or not due\\\");\\n }\\n }\\n\\n /**\\n * Parse validationData into its components.\\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\\n * @return aggregator the aggregator of the validationData\\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\\n */\\n function _getValidationData(\\n uint256 validationData\\n ) internal view returns (address aggregator, bool outOfTimeRange) {\\n if (validationData == 0) {\\n return (address(0), false);\\n }\\n ValidationData memory data = _parseValidationData(validationData);\\n // solhint-disable-next-line not-rely-on-time\\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\\n aggregator = data.aggregator;\\n }\\n\\n /**\\n * Validate account and paymaster (if defined) and\\n * also make sure total validation doesn't exceed verificationGasLimit.\\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\\n * @param opIndex - The index of this userOp into the \\\"opInfos\\\" array.\\n * @param userOp - The userOp to validate.\\n */\\n function _validatePrepayment(\\n uint256 opIndex,\\n PackedUserOperation calldata userOp,\\n UserOpInfo memory outOpInfo\\n )\\n internal\\n returns (uint256 validationData, uint256 paymasterValidationData)\\n {\\n uint256 preGas = gasleft();\\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\\n _copyUserOpToMemory(userOp, mUserOp);\\n outOpInfo.userOpHash = getUserOpHash(userOp);\\n\\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\\n // and multiplied without causing overflow.\\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\\n uint256 maxGasValues = mUserOp.preVerificationGas |\\n verificationGasLimit |\\n mUserOp.callGasLimit |\\n mUserOp.paymasterVerificationGasLimit |\\n mUserOp.paymasterPostOpGasLimit |\\n mUserOp.maxFeePerGas |\\n mUserOp.maxPriorityFeePerGas;\\n require(maxGasValues <= type(uint120).max, \\\"AA94 gas values overflow\\\");\\n\\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\\n validationData = _validateAccountPrepayment(\\n opIndex,\\n userOp,\\n outOpInfo,\\n requiredPreFund,\\n verificationGasLimit\\n );\\n\\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\\n revert FailedOp(opIndex, \\\"AA25 invalid account nonce\\\");\\n }\\n\\n unchecked {\\n if (preGas - gasleft() > verificationGasLimit) {\\n revert FailedOp(opIndex, \\\"AA26 over verificationGasLimit\\\");\\n }\\n }\\n\\n bytes memory context;\\n if (mUserOp.paymaster != address(0)) {\\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\\n opIndex,\\n userOp,\\n outOpInfo,\\n requiredPreFund\\n );\\n }\\n unchecked {\\n outOpInfo.prefund = requiredPreFund;\\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\\n }\\n }\\n\\n /**\\n * Process post-operation, called just after the callData is executed.\\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\\n * @param opInfo - UserOp fields and info collected during validation.\\n * @param context - The context returned in validatePaymasterUserOp.\\n * @param actualGas - The gas used so far by this user operation.\\n */\\n function _postExecution(\\n IPaymaster.PostOpMode mode,\\n UserOpInfo memory opInfo,\\n bytes memory context,\\n uint256 actualGas\\n ) private returns (uint256 actualGasCost) {\\n uint256 preGas = gasleft();\\n unchecked {\\n address refundAddress;\\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\\n\\n address paymaster = mUserOp.paymaster;\\n if (paymaster == address(0)) {\\n refundAddress = mUserOp.sender;\\n } else {\\n refundAddress = paymaster;\\n if (context.length > 0) {\\n actualGasCost = actualGas * gasPrice;\\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\\n try IPaymaster(paymaster).postOp{\\n gas: mUserOp.paymasterPostOpGasLimit\\n }(mode, context, actualGasCost, gasPrice)\\n // solhint-disable-next-line no-empty-blocks\\n {} catch {\\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\\n revert PostOpReverted(reason);\\n }\\n }\\n }\\n }\\n actualGas += preGas - gasleft();\\n\\n // Calculating a penalty for unused execution gas\\n {\\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\\n if (executionGasLimit > executionGasUsed) {\\n uint256 unusedGas = executionGasLimit - executionGasUsed;\\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\\n actualGas += unusedGasPenalty;\\n }\\n }\\n\\n actualGasCost = actualGas * gasPrice;\\n uint256 prefund = opInfo.prefund;\\n if (prefund < actualGasCost) {\\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\\n actualGasCost = prefund;\\n emitPrefundTooLow(opInfo);\\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\\n } else {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0, INNER_REVERT_LOW_PREFUND)\\n revert(0, 32)\\n }\\n }\\n } else {\\n uint256 refund = prefund - actualGasCost;\\n _incrementDeposit(refundAddress, refund);\\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\\n }\\n } // unchecked\\n }\\n\\n /**\\n * The gas price this UserOp agrees to pay.\\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\\n * @param mUserOp - The userOp to get the gas price from.\\n */\\n function getUserOpGasPrice(\\n MemoryUserOp memory mUserOp\\n ) internal view returns (uint256) {\\n unchecked {\\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\\n * The offset of the given bytes in memory.\\n * @param data - The bytes to get the offset of.\\n */\\n function getOffsetOfMemoryBytes(\\n bytes memory data\\n ) internal pure returns (uint256 offset) {\\n assembly {\\n offset := data\\n }\\n }\\n\\n /**\\n * The bytes in memory at the given offset.\\n * @param offset - The offset to get the bytes from.\\n */\\n function getMemoryBytesFromOffset(\\n uint256 offset\\n ) internal pure returns (bytes memory data) {\\n assembly (\\\"memory-safe\\\") {\\n data := offset\\n }\\n }\\n\\n /// @inheritdoc IEntryPoint\\n function delegateAndRevert(address target, bytes calldata data) external {\\n (bool success, bytes memory ret) = target.delegatecall(data);\\n revert DelegateAndRevert(success, ret);\\n }\\n}\\n\"\n },\n \"account-abstraction/contracts/core/EntryPointSimulations.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"./EntryPoint.sol\\\";\\nimport \\\"../interfaces/IEntryPointSimulations.sol\\\";\\n\\n/*\\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\\n * This contract should never be deployed on-chain and is only used as a parameter for the \\\"eth_call\\\" request.\\n */\\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\\n // solhint-disable-next-line var-name-mixedcase\\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\\n\\n SenderCreator private _senderCreator;\\n\\n function initSenderCreator() internal virtual {\\n //this is the address of the first contract created with CREATE by this address.\\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\\\"d694\\\", address(this), hex\\\"01\\\")))));\\n _senderCreator = SenderCreator(createdObj);\\n }\\n\\n function senderCreator() internal view virtual override returns (SenderCreator) {\\n // return the same senderCreator as real EntryPoint.\\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\\n return _senderCreator;\\n }\\n\\n /**\\n * simulation contract should not be deployed, and specifically, accounts should not trust\\n * it as entrypoint, since the simulation functions don't check the signatures\\n */\\n constructor() {\\n require(block.number < 100, \\\"should not be deployed\\\");\\n }\\n\\n /// @inheritdoc IEntryPointSimulations\\n function simulateValidation(\\n PackedUserOperation calldata userOp\\n )\\n external\\n returns (\\n ValidationResult memory\\n ){\\n UserOpInfo memory outOpInfo;\\n\\n _simulationOnlyValidations(userOp);\\n (\\n uint256 validationData,\\n uint256 paymasterValidationData\\n ) = _validatePrepayment(0, userOp, outOpInfo);\\n StakeInfo memory paymasterInfo = _getStakeInfo(\\n outOpInfo.mUserOp.paymaster\\n );\\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\\n StakeInfo memory factoryInfo;\\n {\\n bytes calldata initCode = userOp.initCode;\\n address factory = initCode.length >= 20\\n ? address(bytes20(initCode[0 : 20]))\\n : address(0);\\n factoryInfo = _getStakeInfo(factory);\\n }\\n\\n address aggregator = address(uint160(validationData));\\n ReturnInfo memory returnInfo = ReturnInfo(\\n outOpInfo.preOpGas,\\n outOpInfo.prefund,\\n validationData,\\n paymasterValidationData,\\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\\n );\\n\\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\\n aggregatorInfo = AggregatorStakeInfo(\\n aggregator,\\n _getStakeInfo(aggregator)\\n );\\n }\\n return ValidationResult(\\n returnInfo,\\n senderInfo,\\n factoryInfo,\\n paymasterInfo,\\n aggregatorInfo\\n );\\n }\\n\\n /// @inheritdoc IEntryPointSimulations\\n function simulateHandleOp(\\n PackedUserOperation calldata op,\\n address target,\\n bytes calldata targetCallData\\n )\\n external nonReentrant\\n returns (\\n ExecutionResult memory\\n ){\\n UserOpInfo memory opInfo;\\n _simulationOnlyValidations(op);\\n (\\n uint256 validationData,\\n uint256 paymasterValidationData\\n ) = _validatePrepayment(0, op, opInfo);\\n\\n uint256 paid = _executeUserOp(0, op, opInfo);\\n bool targetSuccess;\\n bytes memory targetResult;\\n if (target != address(0)) {\\n (targetSuccess, targetResult) = target.call(targetCallData);\\n }\\n return ExecutionResult(\\n opInfo.preOpGas,\\n paid,\\n validationData,\\n paymasterValidationData,\\n targetSuccess,\\n targetResult\\n );\\n }\\n\\n function _simulationOnlyValidations(\\n PackedUserOperation calldata userOp\\n )\\n internal\\n {\\n //initialize senderCreator(). we can't rely on constructor\\n initSenderCreator();\\n\\n try\\n this._validateSenderAndPaymaster(\\n userOp.initCode,\\n userOp.sender,\\n userOp.paymasterAndData\\n )\\n // solhint-disable-next-line no-empty-blocks\\n {} catch Error(string memory revertReason) {\\n if (bytes(revertReason).length != 0) {\\n revert FailedOp(0, revertReason);\\n }\\n }\\n }\\n\\n /**\\n * Called only during simulation.\\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\\n * @param initCode - The smart account constructor code.\\n * @param sender - The sender address.\\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\\n */\\n function _validateSenderAndPaymaster(\\n bytes calldata initCode,\\n address sender,\\n bytes calldata paymasterAndData\\n ) external view {\\n if (initCode.length == 0 && sender.code.length == 0) {\\n // it would revert anyway. but give a meaningful message\\n revert(\\\"AA20 account not deployed\\\");\\n }\\n if (paymasterAndData.length >= 20) {\\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\\n if (paymaster.code.length == 0) {\\n // It would revert anyway. but give a meaningful message.\\n revert(\\\"AA30 paymaster not deployed\\\");\\n }\\n }\\n // always revert\\n revert(\\\"\\\");\\n }\\n\\n //make sure depositTo cost is more than normal EntryPoint's cost,\\n // to mitigate DoS vector on the bundler\\n // empiric test showed that without this wrapper, simulation depositTo costs less..\\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\\n unchecked{\\n // silly code, to waste some gas to make sure depositTo is always little more\\n // expensive than on-chain call\\n uint256 x = 1;\\n while (x < 5) {\\n x++;\\n }\\n StakeManager.depositTo(account);\\n }\\n }\\n}\\n\"\n },\n \"account-abstraction/contracts/core/Helpers.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\"\n },\n \"account-abstraction/contracts/core/NonceManager.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\nimport \\\"../interfaces/INonceManager.sol\\\";\\n\\n/**\\n * nonce management functionality\\n */\\nabstract contract NonceManager is INonceManager {\\n\\n /**\\n * The next valid sequence number for a given nonce key.\\n */\\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\\n\\n /// @inheritdoc INonceManager\\n function getNonce(address sender, uint192 key)\\n public view override returns (uint256 nonce) {\\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\\n }\\n\\n // allow an account to manually increment its own nonce.\\n // (mainly so that during construction nonce can be made non-zero,\\n // to \\\"absorb\\\" the gas cost of first nonce increment to 1st transaction (construction),\\n // not to 2nd transaction)\\n function incrementNonce(uint192 key) public override {\\n nonceSequenceNumber[msg.sender][key]++;\\n }\\n\\n /**\\n * validate nonce uniqueness for this account.\\n * called just after validateUserOp()\\n * @return true if the nonce was incremented successfully.\\n * false if the current nonce doesn't match the given one.\\n */\\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\\n\\n uint192 key = uint192(nonce >> 64);\\n uint64 seq = uint64(nonce);\\n return nonceSequenceNumber[sender][key]++ == seq;\\n }\\n\\n}\\n\"\n },\n \"account-abstraction/contracts/core/SenderCreator.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/**\\n * Helper contract for EntryPoint, to call userOp.initCode from a \\\"neutral\\\" address,\\n * which is explicitly not the entryPoint itself.\\n */\\ncontract SenderCreator {\\n /**\\n * Call the \\\"initCode\\\" factory to create and return the sender account address.\\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\\n * followed by calldata.\\n * @return sender - The returned address of the created account, or zero address on failure.\\n */\\n function createSender(\\n bytes calldata initCode\\n ) external returns (address sender) {\\n address factory = address(bytes20(initCode[0:20]));\\n bytes memory initCallData = initCode[20:];\\n bool success;\\n /* solhint-disable no-inline-assembly */\\n assembly (\\\"memory-safe\\\") {\\n success := call(\\n gas(),\\n factory,\\n 0,\\n add(initCallData, 0x20),\\n mload(initCallData),\\n 0,\\n 32\\n )\\n sender := mload(0)\\n }\\n if (!success) {\\n sender = address(0);\\n }\\n }\\n}\\n\"\n },\n \"account-abstraction/contracts/core/StakeManager.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.23;\\n\\nimport \\\"../interfaces/IStakeManager.sol\\\";\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable not-rely-on-time */\\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 a paymaster.\\n */\\nabstract contract StakeManager is IStakeManager {\\n /// maps paymaster to their deposits and stakes\\n mapping(address => DepositInfo) public deposits;\\n\\n /// @inheritdoc IStakeManager\\n function getDepositInfo(\\n address account\\n ) public view returns (DepositInfo memory info) {\\n return deposits[account];\\n }\\n\\n /**\\n * Internal method to return just the stake info.\\n * @param addr - The account to query.\\n */\\n function _getStakeInfo(\\n address addr\\n ) internal view returns (StakeInfo memory info) {\\n DepositInfo storage depositInfo = deposits[addr];\\n info.stake = depositInfo.stake;\\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\\n }\\n\\n /// @inheritdoc IStakeManager\\n function balanceOf(address account) public view returns (uint256) {\\n return deposits[account].deposit;\\n }\\n\\n receive() external payable {\\n depositTo(msg.sender);\\n }\\n\\n /**\\n * Increments an account's deposit.\\n * @param account - The account to increment.\\n * @param amount - The amount to increment by.\\n * @return the updated deposit of this account\\n */\\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\\n DepositInfo storage info = deposits[account];\\n uint256 newAmount = info.deposit + amount;\\n info.deposit = newAmount;\\n return newAmount;\\n }\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\n */\\n function depositTo(address account) public virtual payable {\\n uint256 newDeposit = _incrementDeposit(account, msg.value);\\n emit Deposited(account, newDeposit);\\n }\\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) public payable {\\n DepositInfo storage info = deposits[msg.sender];\\n require(unstakeDelaySec > 0, \\\"must specify unstake delay\\\");\\n require(\\n unstakeDelaySec >= info.unstakeDelaySec,\\n \\\"cannot decrease unstake time\\\"\\n );\\n uint256 stake = info.stake + msg.value;\\n require(stake > 0, \\\"no stake specified\\\");\\n require(stake <= type(uint112).max, \\\"stake overflow\\\");\\n deposits[msg.sender] = DepositInfo(\\n info.deposit,\\n true,\\n uint112(stake),\\n unstakeDelaySec,\\n 0\\n );\\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\\n }\\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 DepositInfo storage info = deposits[msg.sender];\\n require(info.unstakeDelaySec != 0, \\\"not staked\\\");\\n require(info.staked, \\\"already unstaking\\\");\\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\\n info.withdrawTime = withdrawTime;\\n info.staked = false;\\n emit StakeUnlocked(msg.sender, withdrawTime);\\n }\\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 DepositInfo storage info = deposits[msg.sender];\\n uint256 stake = info.stake;\\n require(stake > 0, \\\"No stake to withdraw\\\");\\n require(info.withdrawTime > 0, \\\"must call unlockStake() first\\\");\\n require(\\n info.withdrawTime <= block.timestamp,\\n \\\"Stake withdrawal is not due\\\"\\n );\\n info.unstakeDelaySec = 0;\\n info.withdrawTime = 0;\\n info.stake = 0;\\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\\n (bool success,) = withdrawAddress.call{value: stake}(\\\"\\\");\\n require(success, \\\"failed to withdraw stake\\\");\\n }\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external {\\n DepositInfo storage info = deposits[msg.sender];\\n require(withdrawAmount <= info.deposit, \\\"Withdraw amount too large\\\");\\n info.deposit = info.deposit - withdrawAmount;\\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\\\"\\\");\\n require(success, \\\"failed to withdraw\\\");\\n }\\n}\\n\"\n },\n \"account-abstraction/contracts/core/UserOperationLib.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\"\n },\n \"account-abstraction/contracts/interfaces/IAccount.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\ninterface IAccount {\\n /**\\n * Validate user's signature and nonce\\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\\n * This allows making a \\\"simulation call\\\" without a valid signature\\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\\n *\\n * @dev Must validate caller is the entryPoint.\\n * Must validate the signature and nonce\\n * @param userOp - The operation that is about to be executed.\\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\\n * This is the minimum amount to transfer to the sender(entryPoint) to be\\n * able to make the call. The excess is left as a deposit in the entrypoint\\n * for future calls. Can be withdrawn anytime using \\\"entryPoint.withdrawTo()\\\".\\n * In case there is a paymaster in the request (or the current deposit is high\\n * enough), this value will be zero.\\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\\n * `_unpackValidationData` to encode and decode.\\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 * If an account doesn't use time-range, it is enough to\\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\\n */\\n function validateUserOp(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n uint256 missingAccountFunds\\n ) external returns (uint256 validationData);\\n}\\n\"\n },\n \"account-abstraction/contracts/interfaces/IAccountExecute.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\ninterface IAccountExecute {\\n /**\\n * Account may implement this execute method.\\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\\n * to the account.\\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\\n *\\n * @param userOp - The operation that was just validated.\\n * @param userOpHash - Hash of the user's request data.\\n */\\n function executeUserOp(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash\\n ) external;\\n}\\n\"\n },\n \"account-abstraction/contracts/interfaces/IAggregator.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\"\n },\n \"account-abstraction/contracts/interfaces/IEntryPoint.sol\": {\n \"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\"\n },\n \"account-abstraction/contracts/interfaces/IEntryPointSimulations.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IEntryPoint.sol\\\";\\n\\ninterface IEntryPointSimulations is IEntryPoint {\\n // Return value of simulateHandleOp.\\n struct ExecutionResult {\\n uint256 preOpGas;\\n uint256 paid;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\n bool targetSuccess;\\n bytes targetResult;\\n }\\n\\n /**\\n * Successful result from simulateValidation.\\n * If the account returns a signature aggregator the \\\"aggregatorInfo\\\" struct is filled in as well.\\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 struct ValidationResult {\\n ReturnInfo returnInfo;\\n StakeInfo senderInfo;\\n StakeInfo factoryInfo;\\n StakeInfo paymasterInfo;\\n AggregatorStakeInfo aggregatorInfo;\\n }\\n\\n /**\\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\\n * outside the account's data.\\n * @param userOp - The user operation to validate.\\n * @return the validation result structure\\n */\\n function simulateValidation(\\n PackedUserOperation calldata userOp\\n )\\n external\\n returns (\\n ValidationResult memory\\n );\\n\\n /**\\n * Simulate full execution of a UserOperation (including both validation and target execution)\\n * It performs full validation of the UserOperation, but ignores signature error.\\n * An optional target address is called after the userop succeeds,\\n * and its value is returned (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,\\n * the targetSuccess and targetResult are set to the return from that call.\\n * @param targetCallData - CallData to pass to target address.\\n * @return the execution result structure\\n */\\n function simulateHandleOp(\\n PackedUserOperation calldata op,\\n address target,\\n bytes calldata targetCallData\\n )\\n external\\n returns (\\n ExecutionResult memory\\n );\\n}\\n\"\n },\n \"account-abstraction/contracts/interfaces/INonceManager.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\"\n },\n \"account-abstraction/contracts/interfaces/IPaymaster.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\"\n },\n \"account-abstraction/contracts/interfaces/IStakeManager.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\"\n },\n \"account-abstraction/contracts/interfaces/PackedUserOperation.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\"\n },\n \"account-abstraction/contracts/utils/Exec.sol\": {\n \"content\": \"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity ^0.8.23;\\n\\n// solhint-disable no-inline-assembly\\n\\n/**\\n * Utility functions helpful when making different kinds of contract calls in Solidity.\\n */\\nlibrary Exec {\\n\\n function call(\\n address to,\\n uint256 value,\\n bytes memory data,\\n uint256 txGas\\n ) internal returns (bool success) {\\n assembly (\\\"memory-safe\\\") {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n\\n function staticcall(\\n address to,\\n bytes memory data,\\n uint256 txGas\\n ) internal view returns (bool success) {\\n assembly (\\\"memory-safe\\\") {\\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n\\n function delegateCall(\\n address to,\\n bytes memory data,\\n uint256 txGas\\n ) internal returns (bool success) {\\n assembly (\\\"memory-safe\\\") {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n\\n // get returned data from last call or calldelegate\\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\\n assembly (\\\"memory-safe\\\") {\\n let len := returndatasize()\\n if gt(len, maxLen) {\\n len := maxLen\\n }\\n let ptr := mload(0x40)\\n mstore(0x40, add(ptr, add(len, 0x20)))\\n mstore(ptr, len)\\n returndatacopy(add(ptr, 0x20), 0, len)\\n returnData := ptr\\n }\\n }\\n\\n // revert with explicit byte array (probably reverted info from call)\\n function revertWithData(bytes memory returnData) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n revert(add(returnData, 32), mload(returnData))\\n }\\n }\\n\\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\\n bool success = call(to,0,data,gasleft());\\n if (!success) {\\n revertWithData(getReturnData(maxLen));\\n }\\n }\\n}\\n\"\n },\n \"ds-test/test.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0-or-later\\n\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program. If not, see .\\n\\npragma solidity >=0.5.0;\\n\\ncontract DSTest {\\n event log (string);\\n event logs (bytes);\\n\\n event log_address (address);\\n event log_bytes32 (bytes32);\\n event log_int (int);\\n event log_uint (uint);\\n event log_bytes (bytes);\\n event log_string (string);\\n\\n event log_named_address (string key, address val);\\n event log_named_bytes32 (string key, bytes32 val);\\n event log_named_decimal_int (string key, int val, uint decimals);\\n event log_named_decimal_uint (string key, uint val, uint decimals);\\n event log_named_int (string key, int val);\\n event log_named_uint (string key, uint val);\\n event log_named_bytes (string key, bytes val);\\n event log_named_string (string key, string val);\\n\\n bool public IS_TEST = true;\\n bool private _failed;\\n\\n address constant HEVM_ADDRESS =\\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\\n\\n modifier mayRevert() { _; }\\n modifier testopts(string memory) { _; }\\n\\n function failed() public returns (bool) {\\n if (_failed) {\\n return _failed;\\n } else {\\n bool globalFailed = false;\\n if (hasHEVMContext()) {\\n (, bytes memory retdata) = HEVM_ADDRESS.call(\\n abi.encodePacked(\\n bytes4(keccak256(\\\"load(address,bytes32)\\\")),\\n abi.encode(HEVM_ADDRESS, bytes32(\\\"failed\\\"))\\n )\\n );\\n globalFailed = abi.decode(retdata, (bool));\\n }\\n return globalFailed;\\n }\\n }\\n\\n function fail() internal virtual {\\n if (hasHEVMContext()) {\\n (bool status, ) = HEVM_ADDRESS.call(\\n abi.encodePacked(\\n bytes4(keccak256(\\\"store(address,bytes32,bytes32)\\\")),\\n abi.encode(HEVM_ADDRESS, bytes32(\\\"failed\\\"), bytes32(uint256(0x01)))\\n )\\n );\\n status; // Silence compiler warnings\\n }\\n _failed = true;\\n }\\n\\n function hasHEVMContext() internal view returns (bool) {\\n uint256 hevmCodeSize = 0;\\n assembly {\\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\\n }\\n return hevmCodeSize > 0;\\n }\\n\\n modifier logs_gas() {\\n uint startGas = gasleft();\\n _;\\n uint endGas = gasleft();\\n emit log_named_uint(\\\"gas\\\", startGas - endGas);\\n }\\n\\n function assertTrue(bool condition) internal {\\n if (!condition) {\\n emit log(\\\"Error: Assertion Failed\\\");\\n fail();\\n }\\n }\\n\\n function assertTrue(bool condition, string memory err) internal {\\n if (!condition) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertTrue(condition);\\n }\\n }\\n\\n function assertEq(address a, address b) internal {\\n if (a != b) {\\n emit log(\\\"Error: a == b not satisfied [address]\\\");\\n emit log_named_address(\\\" Left\\\", a);\\n emit log_named_address(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertEq(address a, address b, string memory err) internal {\\n if (a != b) {\\n emit log_named_string (\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n\\n function assertEq(bytes32 a, bytes32 b) internal {\\n if (a != b) {\\n emit log(\\\"Error: a == b not satisfied [bytes32]\\\");\\n emit log_named_bytes32(\\\" Left\\\", a);\\n emit log_named_bytes32(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\\n if (a != b) {\\n emit log_named_string (\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n function assertEq32(bytes32 a, bytes32 b) internal {\\n assertEq(a, b);\\n }\\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\\n assertEq(a, b, err);\\n }\\n\\n function assertEq(int a, int b) internal {\\n if (a != b) {\\n emit log(\\\"Error: a == b not satisfied [int]\\\");\\n emit log_named_int(\\\" Left\\\", a);\\n emit log_named_int(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertEq(int a, int b, string memory err) internal {\\n if (a != b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n function assertEq(uint a, uint b) internal {\\n if (a != b) {\\n emit log(\\\"Error: a == b not satisfied [uint]\\\");\\n emit log_named_uint(\\\" Left\\\", a);\\n emit log_named_uint(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertEq(uint a, uint b, string memory err) internal {\\n if (a != b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n function assertEqDecimal(int a, int b, uint decimals) internal {\\n if (a != b) {\\n emit log(\\\"Error: a == b not satisfied [decimal int]\\\");\\n emit log_named_decimal_int(\\\" Left\\\", a, decimals);\\n emit log_named_decimal_int(\\\" Right\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\\n if (a != b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEqDecimal(a, b, decimals);\\n }\\n }\\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\\n if (a != b) {\\n emit log(\\\"Error: a == b not satisfied [decimal uint]\\\");\\n emit log_named_decimal_uint(\\\" Left\\\", a, decimals);\\n emit log_named_decimal_uint(\\\" Right\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\\n if (a != b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEqDecimal(a, b, decimals);\\n }\\n }\\n\\n function assertNotEq(address a, address b) internal {\\n if (a == b) {\\n emit log(\\\"Error: a != b not satisfied [address]\\\");\\n emit log_named_address(\\\" Left\\\", a);\\n emit log_named_address(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertNotEq(address a, address b, string memory err) internal {\\n if (a == b) {\\n emit log_named_string (\\\"Error\\\", err);\\n assertNotEq(a, b);\\n }\\n }\\n\\n function assertNotEq(bytes32 a, bytes32 b) internal {\\n if (a == b) {\\n emit log(\\\"Error: a != b not satisfied [bytes32]\\\");\\n emit log_named_bytes32(\\\" Left\\\", a);\\n emit log_named_bytes32(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\\n if (a == b) {\\n emit log_named_string (\\\"Error\\\", err);\\n assertNotEq(a, b);\\n }\\n }\\n function assertNotEq32(bytes32 a, bytes32 b) internal {\\n assertNotEq(a, b);\\n }\\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\\n assertNotEq(a, b, err);\\n }\\n\\n function assertNotEq(int a, int b) internal {\\n if (a == b) {\\n emit log(\\\"Error: a != b not satisfied [int]\\\");\\n emit log_named_int(\\\" Left\\\", a);\\n emit log_named_int(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertNotEq(int a, int b, string memory err) internal {\\n if (a == b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertNotEq(a, b);\\n }\\n }\\n function assertNotEq(uint a, uint b) internal {\\n if (a == b) {\\n emit log(\\\"Error: a != b not satisfied [uint]\\\");\\n emit log_named_uint(\\\" Left\\\", a);\\n emit log_named_uint(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertNotEq(uint a, uint b, string memory err) internal {\\n if (a == b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertNotEq(a, b);\\n }\\n }\\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\\n if (a == b) {\\n emit log(\\\"Error: a != b not satisfied [decimal int]\\\");\\n emit log_named_decimal_int(\\\" Left\\\", a, decimals);\\n emit log_named_decimal_int(\\\" Right\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\\n if (a == b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertNotEqDecimal(a, b, decimals);\\n }\\n }\\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\\n if (a == b) {\\n emit log(\\\"Error: a != b not satisfied [decimal uint]\\\");\\n emit log_named_decimal_uint(\\\" Left\\\", a, decimals);\\n emit log_named_decimal_uint(\\\" Right\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\\n if (a == b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertNotEqDecimal(a, b, decimals);\\n }\\n }\\n\\n function assertGt(uint a, uint b) internal {\\n if (a <= b) {\\n emit log(\\\"Error: a > b not satisfied [uint]\\\");\\n emit log_named_uint(\\\" Value a\\\", a);\\n emit log_named_uint(\\\" Value b\\\", b);\\n fail();\\n }\\n }\\n function assertGt(uint a, uint b, string memory err) internal {\\n if (a <= b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertGt(a, b);\\n }\\n }\\n function assertGt(int a, int b) internal {\\n if (a <= b) {\\n emit log(\\\"Error: a > b not satisfied [int]\\\");\\n emit log_named_int(\\\" Value a\\\", a);\\n emit log_named_int(\\\" Value b\\\", b);\\n fail();\\n }\\n }\\n function assertGt(int a, int b, string memory err) internal {\\n if (a <= b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertGt(a, b);\\n }\\n }\\n function assertGtDecimal(int a, int b, uint decimals) internal {\\n if (a <= b) {\\n emit log(\\\"Error: a > b not satisfied [decimal int]\\\");\\n emit log_named_decimal_int(\\\" Value a\\\", a, decimals);\\n emit log_named_decimal_int(\\\" Value b\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\\n if (a <= b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertGtDecimal(a, b, decimals);\\n }\\n }\\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\\n if (a <= b) {\\n emit log(\\\"Error: a > b not satisfied [decimal uint]\\\");\\n emit log_named_decimal_uint(\\\" Value a\\\", a, decimals);\\n emit log_named_decimal_uint(\\\" Value b\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\\n if (a <= b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertGtDecimal(a, b, decimals);\\n }\\n }\\n\\n function assertGe(uint a, uint b) internal {\\n if (a < b) {\\n emit log(\\\"Error: a >= b not satisfied [uint]\\\");\\n emit log_named_uint(\\\" Value a\\\", a);\\n emit log_named_uint(\\\" Value b\\\", b);\\n fail();\\n }\\n }\\n function assertGe(uint a, uint b, string memory err) internal {\\n if (a < b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertGe(a, b);\\n }\\n }\\n function assertGe(int a, int b) internal {\\n if (a < b) {\\n emit log(\\\"Error: a >= b not satisfied [int]\\\");\\n emit log_named_int(\\\" Value a\\\", a);\\n emit log_named_int(\\\" Value b\\\", b);\\n fail();\\n }\\n }\\n function assertGe(int a, int b, string memory err) internal {\\n if (a < b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertGe(a, b);\\n }\\n }\\n function assertGeDecimal(int a, int b, uint decimals) internal {\\n if (a < b) {\\n emit log(\\\"Error: a >= b not satisfied [decimal int]\\\");\\n emit log_named_decimal_int(\\\" Value a\\\", a, decimals);\\n emit log_named_decimal_int(\\\" Value b\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\\n if (a < b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertGeDecimal(a, b, decimals);\\n }\\n }\\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\\n if (a < b) {\\n emit log(\\\"Error: a >= b not satisfied [decimal uint]\\\");\\n emit log_named_decimal_uint(\\\" Value a\\\", a, decimals);\\n emit log_named_decimal_uint(\\\" Value b\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\\n if (a < b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertGeDecimal(a, b, decimals);\\n }\\n }\\n\\n function assertLt(uint a, uint b) internal {\\n if (a >= b) {\\n emit log(\\\"Error: a < b not satisfied [uint]\\\");\\n emit log_named_uint(\\\" Value a\\\", a);\\n emit log_named_uint(\\\" Value b\\\", b);\\n fail();\\n }\\n }\\n function assertLt(uint a, uint b, string memory err) internal {\\n if (a >= b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertLt(a, b);\\n }\\n }\\n function assertLt(int a, int b) internal {\\n if (a >= b) {\\n emit log(\\\"Error: a < b not satisfied [int]\\\");\\n emit log_named_int(\\\" Value a\\\", a);\\n emit log_named_int(\\\" Value b\\\", b);\\n fail();\\n }\\n }\\n function assertLt(int a, int b, string memory err) internal {\\n if (a >= b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertLt(a, b);\\n }\\n }\\n function assertLtDecimal(int a, int b, uint decimals) internal {\\n if (a >= b) {\\n emit log(\\\"Error: a < b not satisfied [decimal int]\\\");\\n emit log_named_decimal_int(\\\" Value a\\\", a, decimals);\\n emit log_named_decimal_int(\\\" Value b\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\\n if (a >= b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertLtDecimal(a, b, decimals);\\n }\\n }\\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\\n if (a >= b) {\\n emit log(\\\"Error: a < b not satisfied [decimal uint]\\\");\\n emit log_named_decimal_uint(\\\" Value a\\\", a, decimals);\\n emit log_named_decimal_uint(\\\" Value b\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\\n if (a >= b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertLtDecimal(a, b, decimals);\\n }\\n }\\n\\n function assertLe(uint a, uint b) internal {\\n if (a > b) {\\n emit log(\\\"Error: a <= b not satisfied [uint]\\\");\\n emit log_named_uint(\\\" Value a\\\", a);\\n emit log_named_uint(\\\" Value b\\\", b);\\n fail();\\n }\\n }\\n function assertLe(uint a, uint b, string memory err) internal {\\n if (a > b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertLe(a, b);\\n }\\n }\\n function assertLe(int a, int b) internal {\\n if (a > b) {\\n emit log(\\\"Error: a <= b not satisfied [int]\\\");\\n emit log_named_int(\\\" Value a\\\", a);\\n emit log_named_int(\\\" Value b\\\", b);\\n fail();\\n }\\n }\\n function assertLe(int a, int b, string memory err) internal {\\n if (a > b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertLe(a, b);\\n }\\n }\\n function assertLeDecimal(int a, int b, uint decimals) internal {\\n if (a > b) {\\n emit log(\\\"Error: a <= b not satisfied [decimal int]\\\");\\n emit log_named_decimal_int(\\\" Value a\\\", a, decimals);\\n emit log_named_decimal_int(\\\" Value b\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\\n if (a > b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertLeDecimal(a, b, decimals);\\n }\\n }\\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\\n if (a > b) {\\n emit log(\\\"Error: a <= b not satisfied [decimal uint]\\\");\\n emit log_named_decimal_uint(\\\" Value a\\\", a, decimals);\\n emit log_named_decimal_uint(\\\" Value b\\\", b, decimals);\\n fail();\\n }\\n }\\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\\n if (a > b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertLeDecimal(a, b, decimals);\\n }\\n }\\n\\n function assertEq(string memory a, string memory b) internal {\\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\\n emit log(\\\"Error: a == b not satisfied [string]\\\");\\n emit log_named_string(\\\" Left\\\", a);\\n emit log_named_string(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertEq(string memory a, string memory b, string memory err) internal {\\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n\\n function assertNotEq(string memory a, string memory b) internal {\\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\\n emit log(\\\"Error: a != b not satisfied [string]\\\");\\n emit log_named_string(\\\" Left\\\", a);\\n emit log_named_string(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertNotEq(string memory a, string memory b, string memory err) internal {\\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertNotEq(a, b);\\n }\\n }\\n\\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\\n ok = true;\\n if (a.length == b.length) {\\n for (uint i = 0; i < a.length; i++) {\\n if (a[i] != b[i]) {\\n ok = false;\\n }\\n }\\n } else {\\n ok = false;\\n }\\n }\\n function assertEq0(bytes memory a, bytes memory b) internal {\\n if (!checkEq0(a, b)) {\\n emit log(\\\"Error: a == b not satisfied [bytes]\\\");\\n emit log_named_bytes(\\\" Left\\\", a);\\n emit log_named_bytes(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\\n if (!checkEq0(a, b)) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEq0(a, b);\\n }\\n }\\n\\n function assertNotEq0(bytes memory a, bytes memory b) internal {\\n if (checkEq0(a, b)) {\\n emit log(\\\"Error: a != b not satisfied [bytes]\\\");\\n emit log_named_bytes(\\\" Left\\\", a);\\n emit log_named_bytes(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\\n if (checkEq0(a, b)) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertNotEq0(a, b);\\n }\\n }\\n}\\n\"\n },\n \"forge-std/Base.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\nimport {StdStorage} from \\\"./StdStorage.sol\\\";\\nimport {Vm, VmSafe} from \\\"./Vm.sol\\\";\\n\\nabstract contract CommonBase {\\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\\\"hevm cheat code\\\"))));\\n // console.sol and console2.sol work by executing a staticcall to this address.\\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\\\"foundry default caller\\\"))));\\n // Address of the test contract, deployed by the DEFAULT_SENDER.\\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\\n // Deterministic deployment address of the Multicall3 contract.\\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\\n // The order of the secp256k1 curve.\\n uint256 internal constant SECP256K1_ORDER =\\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\\n\\n uint256 internal constant UINT256_MAX =\\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\\n\\n Vm internal constant vm = Vm(VM_ADDRESS);\\n StdStorage internal stdstore;\\n}\\n\\nabstract contract TestBase is CommonBase {}\\n\\nabstract contract ScriptBase is CommonBase {\\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\\n}\\n\"\n },\n \"forge-std/console.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nlibrary console {\\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n function _sendLogPayload(bytes memory payload) private view {\\n uint256 payloadLength = payload.length;\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n let payloadStart := add(payload, 32)\\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n }\\n }\\n\\n function log() internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n\\n function logInt(int p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n }\\n\\n function logUint(uint p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n }\\n\\n function log(string memory p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint p0, uint p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n }\\n\\n function log(uint p0, string memory p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n }\\n\\n function log(uint p0, bool p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n }\\n\\n function log(uint p0, address p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint p0, uint p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, uint p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, uint p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, uint p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, string memory p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, string memory p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, string memory p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, string memory p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, bool p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, bool p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, bool p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, bool p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, address p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, address p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, address p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, address p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, uint p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, string memory p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, bool p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint p0, address p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal view {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\"\n },\n \"forge-std/console2.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\\nlibrary console2 {\\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n function _castLogPayloadViewToPure(\\n function(bytes memory) internal view fnIn\\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\\n assembly {\\n fnOut := fnIn\\n }\\n }\\n\\n function _sendLogPayload(bytes memory payload) internal pure {\\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\\n }\\n\\n function _sendLogPayloadView(bytes memory payload) private view {\\n uint256 payloadLength = payload.length;\\n address consoleAddress = CONSOLE_ADDRESS;\\n /// @solidity memory-safe-assembly\\n assembly {\\n let payloadStart := add(payload, 32)\\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n }\\n }\\n\\n function log() internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n }\\n\\n function logInt(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function logUint(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function logString(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function logBool(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function logAddress(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function logBytes(bytes memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n }\\n\\n function logBytes1(bytes1 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n }\\n\\n function logBytes2(bytes2 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n }\\n\\n function logBytes3(bytes3 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n }\\n\\n function logBytes4(bytes4 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n }\\n\\n function logBytes5(bytes5 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n }\\n\\n function logBytes6(bytes6 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n }\\n\\n function logBytes7(bytes7 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n }\\n\\n function logBytes8(bytes8 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n }\\n\\n function logBytes9(bytes9 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n }\\n\\n function logBytes10(bytes10 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n }\\n\\n function logBytes11(bytes11 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n }\\n\\n function logBytes12(bytes12 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n }\\n\\n function logBytes13(bytes13 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n }\\n\\n function logBytes14(bytes14 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n }\\n\\n function logBytes15(bytes15 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n }\\n\\n function logBytes16(bytes16 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n }\\n\\n function logBytes17(bytes17 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n }\\n\\n function logBytes18(bytes18 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n }\\n\\n function logBytes19(bytes19 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n }\\n\\n function logBytes20(bytes20 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n }\\n\\n function logBytes21(bytes21 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n }\\n\\n function logBytes22(bytes22 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n }\\n\\n function logBytes23(bytes23 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n }\\n\\n function logBytes24(bytes24 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n }\\n\\n function logBytes25(bytes25 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n }\\n\\n function logBytes26(bytes26 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n }\\n\\n function logBytes27(bytes27 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n }\\n\\n function logBytes28(bytes28 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n }\\n\\n function logBytes29(bytes29 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n }\\n\\n function logBytes30(bytes30 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n }\\n\\n function logBytes31(bytes31 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n }\\n\\n function logBytes32(bytes32 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n }\\n\\n function log(uint256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256)\\\", p0));\\n }\\n\\n function log(int256 p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(int256)\\\", p0));\\n }\\n\\n function log(string memory p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n }\\n\\n function log(bool p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n }\\n\\n function log(address p0) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, int256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,int256)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n }\\n\\n function log(string memory p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256)\\\", p0, p1));\\n }\\n\\n function log(bool p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256)\\\", p0, p1));\\n }\\n\\n function log(address p0, string memory p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n }\\n\\n function log(address p0, address p1) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(string memory p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, string memory p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, string memory p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(uint256,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(string memory p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint256,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, string memory p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint256,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, string memory p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint256)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, string memory p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n _sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n }\\n\\n}\"\n },\n \"forge-std/interfaces/IERC165.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2;\\n\\ninterface IERC165 {\\n /// @notice Query if a contract implements an interface\\n /// @param interfaceID The interface identifier, as specified in ERC-165\\n /// @dev Interface identification is specified in ERC-165. This function\\n /// uses less than 30,000 gas.\\n /// @return `true` if the contract implements `interfaceID` and\\n /// `interfaceID` is not 0xffffffff, `false` otherwise\\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\\n}\\n\"\n },\n \"forge-std/interfaces/IMulticall3.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\npragma experimental ABIEncoderV2;\\n\\ninterface IMulticall3 {\\n struct Call {\\n address target;\\n bytes callData;\\n }\\n\\n struct Call3 {\\n address target;\\n bool allowFailure;\\n bytes callData;\\n }\\n\\n struct Call3Value {\\n address target;\\n bool allowFailure;\\n uint256 value;\\n bytes callData;\\n }\\n\\n struct Result {\\n bool success;\\n bytes returnData;\\n }\\n\\n function aggregate(Call[] calldata calls)\\n external\\n payable\\n returns (uint256 blockNumber, bytes[] memory returnData);\\n\\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\\n\\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\\n\\n function blockAndAggregate(Call[] calldata calls)\\n external\\n payable\\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\\n\\n function getBasefee() external view returns (uint256 basefee);\\n\\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\\n\\n function getBlockNumber() external view returns (uint256 blockNumber);\\n\\n function getChainId() external view returns (uint256 chainid);\\n\\n function getCurrentBlockCoinbase() external view returns (address coinbase);\\n\\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\\n\\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\\n\\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\\n\\n function getEthBalance(address addr) external view returns (uint256 balance);\\n\\n function getLastBlockHash() external view returns (bytes32 blockHash);\\n\\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\\n external\\n payable\\n returns (Result[] memory returnData);\\n\\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\\n external\\n payable\\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\\n}\\n\"\n },\n \"forge-std/safeconsole.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\n/// @author philogy \\n/// @dev Code generated automatically by script.\\nlibrary safeconsole {\\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\\n\\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\\n // for the view-to-pure log trick.\\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\\n function(uint256, uint256) internal pure pureSendLogPayload;\\n assembly {\\n pureSendLogPayload := fnIn\\n }\\n pureSendLogPayload(offset, size);\\n }\\n\\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\\n assembly {\\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\\n }\\n }\\n\\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\\n function(uint256, uint256, uint256) internal pure pureMemcopy;\\n assembly {\\n pureMemcopy := fnIn\\n }\\n pureMemcopy(fromOffset, toOffset, length);\\n }\\n\\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\\n assembly {\\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\\n }\\n }\\n\\n function logMemory(uint256 offset, uint256 length) internal pure {\\n if (offset >= 0x60) {\\n // Sufficient memory before slice to prepare call header.\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(sub(offset, 0x60))\\n m1 := mload(sub(offset, 0x40))\\n m2 := mload(sub(offset, 0x20))\\n // Selector of `logBytes(bytes)`.\\n mstore(sub(offset, 0x60), 0xe17bf956)\\n mstore(sub(offset, 0x40), 0x20)\\n mstore(sub(offset, 0x20), length)\\n }\\n _sendLogPayload(offset - 0x44, length + 0x44);\\n assembly {\\n mstore(sub(offset, 0x60), m0)\\n mstore(sub(offset, 0x40), m1)\\n mstore(sub(offset, 0x20), m2)\\n }\\n } else {\\n // Insufficient space, so copy slice forward, add header and reverse.\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n uint256 endOffset = offset + length;\\n assembly {\\n m0 := mload(add(endOffset, 0x00))\\n m1 := mload(add(endOffset, 0x20))\\n m2 := mload(add(endOffset, 0x40))\\n }\\n _memcopy(offset, offset + 0x60, length);\\n assembly {\\n // Selector of `logBytes(bytes)`.\\n mstore(add(offset, 0x00), 0xe17bf956)\\n mstore(add(offset, 0x20), 0x20)\\n mstore(add(offset, 0x40), length)\\n }\\n _sendLogPayload(offset + 0x1c, length + 0x44);\\n _memcopy(offset + 0x60, offset, length);\\n assembly {\\n mstore(add(endOffset, 0x00), m0)\\n mstore(add(endOffset, 0x20), m1)\\n mstore(add(endOffset, 0x40), m2)\\n }\\n }\\n }\\n\\n function log(address p0) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n // Selector of `log(address)`.\\n mstore(0x00, 0x2c2ecbc2)\\n mstore(0x20, p0)\\n }\\n _sendLogPayload(0x1c, 0x24);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n }\\n }\\n\\n function log(bool p0) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n // Selector of `log(bool)`.\\n mstore(0x00, 0x32458eed)\\n mstore(0x20, p0)\\n }\\n _sendLogPayload(0x1c, 0x24);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n }\\n }\\n\\n function log(uint256 p0) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n // Selector of `log(uint256)`.\\n mstore(0x00, 0xf82c50f1)\\n mstore(0x20, p0)\\n }\\n _sendLogPayload(0x1c, 0x24);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n }\\n }\\n\\n function log(bytes32 p0) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(string)`.\\n mstore(0x00, 0x41304fac)\\n mstore(0x20, 0x20)\\n writeString(0x40, p0)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, address p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(address,address)`.\\n mstore(0x00, 0xdaf0d4aa)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(address p0, bool p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(address,bool)`.\\n mstore(0x00, 0x75b605d3)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(address p0, uint256 p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(address,uint256)`.\\n mstore(0x00, 0x8309e8a8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(address p0, bytes32 p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,string)`.\\n mstore(0x00, 0x759f86bb)\\n mstore(0x20, p0)\\n mstore(0x40, 0x40)\\n writeString(0x60, p1)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(bool,address)`.\\n mstore(0x00, 0x853c4849)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(bool p0, bool p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(bool,bool)`.\\n mstore(0x00, 0x2a110e83)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(bool p0, uint256 p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(bool,uint256)`.\\n mstore(0x00, 0x399174d3)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,string)`.\\n mstore(0x00, 0x8feac525)\\n mstore(0x20, p0)\\n mstore(0x40, 0x40)\\n writeString(0x60, p1)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(uint256,address)`.\\n mstore(0x00, 0x69276c86)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(uint256 p0, bool p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(uint256,bool)`.\\n mstore(0x00, 0x1c9d7eb3)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n // Selector of `log(uint256,uint256)`.\\n mstore(0x00, 0xf666715a)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n }\\n _sendLogPayload(0x1c, 0x44);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,string)`.\\n mstore(0x00, 0x643fd0df)\\n mstore(0x20, p0)\\n mstore(0x40, 0x40)\\n writeString(0x60, p1)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bytes32 p0, address p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(string,address)`.\\n mstore(0x00, 0x319af333)\\n mstore(0x20, 0x40)\\n mstore(0x40, p1)\\n writeString(0x60, p0)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(string,bool)`.\\n mstore(0x00, 0xc3b55635)\\n mstore(0x20, 0x40)\\n mstore(0x40, p1)\\n writeString(0x60, p0)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(string,uint256)`.\\n mstore(0x00, 0xb60e72cc)\\n mstore(0x20, 0x40)\\n mstore(0x40, p1)\\n writeString(0x60, p0)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,string)`.\\n mstore(0x00, 0x4b5c4277)\\n mstore(0x20, 0x40)\\n mstore(0x40, 0x80)\\n writeString(0x60, p0)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, address p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,address,address)`.\\n mstore(0x00, 0x018c84c2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, address p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,address,bool)`.\\n mstore(0x00, 0xf2a66286)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, address p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,address,uint256)`.\\n mstore(0x00, 0x17fe6185)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, address p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(address,address,string)`.\\n mstore(0x00, 0x007150be)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(address p0, bool p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,bool,address)`.\\n mstore(0x00, 0xf11699ed)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, bool p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,bool,bool)`.\\n mstore(0x00, 0xeb830c92)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, bool p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,bool,uint256)`.\\n mstore(0x00, 0x9c4f99fb)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, bool p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(address,bool,string)`.\\n mstore(0x00, 0x212255cc)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(address p0, uint256 p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,uint256,address)`.\\n mstore(0x00, 0x7bc0d848)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,uint256,bool)`.\\n mstore(0x00, 0x678209a8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(address,uint256,uint256)`.\\n mstore(0x00, 0xb69bcaf6)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(address,uint256,string)`.\\n mstore(0x00, 0xa1f2e8aa)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(address,string,address)`.\\n mstore(0x00, 0xf08744e8)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(address,string,bool)`.\\n mstore(0x00, 0xcf020fb1)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(address,string,uint256)`.\\n mstore(0x00, 0x67dd6ff1)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(address,string,string)`.\\n mstore(0x00, 0xfb772265)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, 0xa0)\\n writeString(0x80, p1)\\n writeString(0xc0, p2)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(bool p0, address p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,address,address)`.\\n mstore(0x00, 0xd2763667)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, address p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,address,bool)`.\\n mstore(0x00, 0x18c9c746)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, address p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,address,uint256)`.\\n mstore(0x00, 0x5f7b9afb)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, address p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(bool,address,string)`.\\n mstore(0x00, 0xde9a9270)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bool p0, bool p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,bool,address)`.\\n mstore(0x00, 0x1078f68d)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, bool p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,bool,bool)`.\\n mstore(0x00, 0x50709698)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, bool p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,bool,uint256)`.\\n mstore(0x00, 0x12f21602)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, bool p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(bool,bool,string)`.\\n mstore(0x00, 0x2555fa46)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,uint256,address)`.\\n mstore(0x00, 0x088ef9d2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,uint256,bool)`.\\n mstore(0x00, 0xe8defba9)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(bool,uint256,uint256)`.\\n mstore(0x00, 0x37103367)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(bool,uint256,string)`.\\n mstore(0x00, 0xc3fc3970)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(bool,string,address)`.\\n mstore(0x00, 0x9591b953)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(bool,string,bool)`.\\n mstore(0x00, 0xdbb4c247)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(bool,string,uint256)`.\\n mstore(0x00, 0x1093ee11)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(bool,string,string)`.\\n mstore(0x00, 0xb076847f)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, 0xa0)\\n writeString(0x80, p1)\\n writeString(0xc0, p2)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(uint256 p0, address p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,address,address)`.\\n mstore(0x00, 0xbcfd9be0)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,address,bool)`.\\n mstore(0x00, 0x9b6ec042)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,address,uint256)`.\\n mstore(0x00, 0x5a9b5ed5)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(uint256,address,string)`.\\n mstore(0x00, 0x63cb41f9)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,bool,address)`.\\n mstore(0x00, 0x35085f7b)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,bool,bool)`.\\n mstore(0x00, 0x20718650)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,bool,uint256)`.\\n mstore(0x00, 0x20098014)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(uint256,bool,string)`.\\n mstore(0x00, 0x85775021)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,uint256,address)`.\\n mstore(0x00, 0x5c96b331)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,uint256,bool)`.\\n mstore(0x00, 0x4766da72)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n // Selector of `log(uint256,uint256,uint256)`.\\n mstore(0x00, 0xd1ed7a3c)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n }\\n _sendLogPayload(0x1c, 0x64);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(uint256,uint256,string)`.\\n mstore(0x00, 0x71d04af2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x60)\\n writeString(0x80, p2)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(uint256,string,address)`.\\n mstore(0x00, 0x7afac959)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(uint256,string,bool)`.\\n mstore(0x00, 0x4ceda75a)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(uint256,string,uint256)`.\\n mstore(0x00, 0x37aa7d4c)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, p2)\\n writeString(0x80, p1)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(uint256,string,string)`.\\n mstore(0x00, 0xb115611f)\\n mstore(0x20, p0)\\n mstore(0x40, 0x60)\\n mstore(0x60, 0xa0)\\n writeString(0x80, p1)\\n writeString(0xc0, p2)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,address,address)`.\\n mstore(0x00, 0xfcec75e0)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,address,bool)`.\\n mstore(0x00, 0xc91d5ed4)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,address,uint256)`.\\n mstore(0x00, 0x0d26b925)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(string,address,string)`.\\n mstore(0x00, 0xe0e9ad4f)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, 0xa0)\\n writeString(0x80, p0)\\n writeString(0xc0, p2)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,bool,address)`.\\n mstore(0x00, 0x932bbb38)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,bool,bool)`.\\n mstore(0x00, 0x850b7ad6)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,bool,uint256)`.\\n mstore(0x00, 0xc95958d6)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(string,bool,string)`.\\n mstore(0x00, 0xe298f47d)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, 0xa0)\\n writeString(0x80, p0)\\n writeString(0xc0, p2)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,uint256,address)`.\\n mstore(0x00, 0x1c7ec448)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,uint256,bool)`.\\n mstore(0x00, 0xca7733b1)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n // Selector of `log(string,uint256,uint256)`.\\n mstore(0x00, 0xca47c4eb)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n }\\n _sendLogPayload(0x1c, 0xa4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(string,uint256,string)`.\\n mstore(0x00, 0x5970e089)\\n mstore(0x20, 0x60)\\n mstore(0x40, p1)\\n mstore(0x60, 0xa0)\\n writeString(0x80, p0)\\n writeString(0xc0, p2)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(string,string,address)`.\\n mstore(0x00, 0x95ed0195)\\n mstore(0x20, 0x60)\\n mstore(0x40, 0xa0)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n writeString(0xc0, p1)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(string,string,bool)`.\\n mstore(0x00, 0xb0e0f9b5)\\n mstore(0x20, 0x60)\\n mstore(0x40, 0xa0)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n writeString(0xc0, p1)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n // Selector of `log(string,string,uint256)`.\\n mstore(0x00, 0x5821efa1)\\n mstore(0x20, 0x60)\\n mstore(0x40, 0xa0)\\n mstore(0x60, p2)\\n writeString(0x80, p0)\\n writeString(0xc0, p1)\\n }\\n _sendLogPayload(0x1c, 0xe4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n // Selector of `log(string,string,string)`.\\n mstore(0x00, 0x2ced7cef)\\n mstore(0x20, 0x60)\\n mstore(0x40, 0xa0)\\n mstore(0x60, 0xe0)\\n writeString(0x80, p0)\\n writeString(0xc0, p1)\\n writeString(0x100, p2)\\n }\\n _sendLogPayload(0x1c, 0x124);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n }\\n }\\n\\n function log(address p0, address p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,address,address)`.\\n mstore(0x00, 0x665bf134)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,address,bool)`.\\n mstore(0x00, 0x0e378994)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,address,uint256)`.\\n mstore(0x00, 0x94250d77)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,address,address,string)`.\\n mstore(0x00, 0xf808da20)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, address p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,bool,address)`.\\n mstore(0x00, 0x9f1bc36e)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,bool,bool)`.\\n mstore(0x00, 0x2cd4134a)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,bool,uint256)`.\\n mstore(0x00, 0x3971e78c)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,address,bool,string)`.\\n mstore(0x00, 0xaa6540c8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,uint256,address)`.\\n mstore(0x00, 0x8da6def5)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,uint256,bool)`.\\n mstore(0x00, 0x9b4254e2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,address,uint256,uint256)`.\\n mstore(0x00, 0xbe553481)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,address,uint256,string)`.\\n mstore(0x00, 0xfdb4f990)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,address,string,address)`.\\n mstore(0x00, 0x8f736d16)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,address,string,bool)`.\\n mstore(0x00, 0x6f1a594e)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,address,string,uint256)`.\\n mstore(0x00, 0xef1cefe7)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,address,string,string)`.\\n mstore(0x00, 0x21bdaf25)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, bool p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,address,address)`.\\n mstore(0x00, 0x660375dd)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,address,bool)`.\\n mstore(0x00, 0xa6f50b0f)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,address,uint256)`.\\n mstore(0x00, 0xa75c59de)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,bool,address,string)`.\\n mstore(0x00, 0x2dd778e6)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bool p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,bool,address)`.\\n mstore(0x00, 0xcf394485)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,bool,bool)`.\\n mstore(0x00, 0xcac43479)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,bool,uint256)`.\\n mstore(0x00, 0x8c4e5de6)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,bool,bool,string)`.\\n mstore(0x00, 0xdfc4a2e8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,uint256,address)`.\\n mstore(0x00, 0xccf790a1)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,uint256,bool)`.\\n mstore(0x00, 0xc4643e20)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,bool,uint256,uint256)`.\\n mstore(0x00, 0x386ff5f4)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,bool,uint256,string)`.\\n mstore(0x00, 0x0aa6cfad)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,bool,string,address)`.\\n mstore(0x00, 0x19fd4956)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,bool,string,bool)`.\\n mstore(0x00, 0x50ad461d)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,bool,string,uint256)`.\\n mstore(0x00, 0x80e6a20b)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,bool,string,string)`.\\n mstore(0x00, 0x475c5c33)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,address,address)`.\\n mstore(0x00, 0x478d1c62)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,address,bool)`.\\n mstore(0x00, 0xa1bcc9b3)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,address,uint256)`.\\n mstore(0x00, 0x100f650e)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,uint256,address,string)`.\\n mstore(0x00, 0x1da986ea)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,bool,address)`.\\n mstore(0x00, 0xa31bfdcc)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,bool,bool)`.\\n mstore(0x00, 0x3bf5e537)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,bool,uint256)`.\\n mstore(0x00, 0x22f6b999)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,uint256,bool,string)`.\\n mstore(0x00, 0xc5ad85f9)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,uint256,address)`.\\n mstore(0x00, 0x20e3984d)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,uint256,bool)`.\\n mstore(0x00, 0x66f1bc67)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(address,uint256,uint256,uint256)`.\\n mstore(0x00, 0x34f0e636)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,uint256,uint256,string)`.\\n mstore(0x00, 0x4a28c017)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,uint256,string,address)`.\\n mstore(0x00, 0x5c430d47)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,uint256,string,bool)`.\\n mstore(0x00, 0xcf18105c)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,uint256,string,uint256)`.\\n mstore(0x00, 0xbf01f891)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,uint256,string,string)`.\\n mstore(0x00, 0x88a8c406)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,address,address)`.\\n mstore(0x00, 0x0d36fa20)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,address,bool)`.\\n mstore(0x00, 0x0df12b76)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,address,uint256)`.\\n mstore(0x00, 0x457fe3cf)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,string,address,string)`.\\n mstore(0x00, 0xf7e36245)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,bool,address)`.\\n mstore(0x00, 0x205871c2)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,bool,bool)`.\\n mstore(0x00, 0x5f1d5c9f)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,bool,uint256)`.\\n mstore(0x00, 0x515e38b6)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,string,bool,string)`.\\n mstore(0x00, 0xbc0b61fe)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,uint256,address)`.\\n mstore(0x00, 0x63183678)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,uint256,bool)`.\\n mstore(0x00, 0x0ef7e050)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(address,string,uint256,uint256)`.\\n mstore(0x00, 0x1dc8e1b8)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,string,uint256,string)`.\\n mstore(0x00, 0x448830a8)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,string,string,address)`.\\n mstore(0x00, 0xa04e2f87)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,string,string,bool)`.\\n mstore(0x00, 0x35a5071f)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(address,string,string,uint256)`.\\n mstore(0x00, 0x159f8927)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(address,string,string,string)`.\\n mstore(0x00, 0x5d02c50b)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bool p0, address p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,address,address)`.\\n mstore(0x00, 0x1d14d001)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,address,bool)`.\\n mstore(0x00, 0x46600be0)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,address,uint256)`.\\n mstore(0x00, 0x0c66d1be)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,address,address,string)`.\\n mstore(0x00, 0xd812a167)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, address p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,bool,address)`.\\n mstore(0x00, 0x1c41a336)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,bool,bool)`.\\n mstore(0x00, 0x6a9c478b)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,bool,uint256)`.\\n mstore(0x00, 0x07831502)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,address,bool,string)`.\\n mstore(0x00, 0x4a66cb34)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,uint256,address)`.\\n mstore(0x00, 0x136b05dd)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,uint256,bool)`.\\n mstore(0x00, 0xd6019f1c)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,address,uint256,uint256)`.\\n mstore(0x00, 0x7bf181a1)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,address,uint256,string)`.\\n mstore(0x00, 0x51f09ff8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,address,string,address)`.\\n mstore(0x00, 0x6f7c603e)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,address,string,bool)`.\\n mstore(0x00, 0xe2bfd60b)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,address,string,uint256)`.\\n mstore(0x00, 0xc21f64c7)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,address,string,string)`.\\n mstore(0x00, 0xa73c1db6)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, bool p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,address,address)`.\\n mstore(0x00, 0xf4880ea4)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,address,bool)`.\\n mstore(0x00, 0xc0a302d8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,address,uint256)`.\\n mstore(0x00, 0x4c123d57)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,bool,address,string)`.\\n mstore(0x00, 0xa0a47963)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,bool,address)`.\\n mstore(0x00, 0x8c329b1a)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,bool,bool)`.\\n mstore(0x00, 0x3b2a5ce0)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,bool,uint256)`.\\n mstore(0x00, 0x6d7045c1)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,bool,bool,string)`.\\n mstore(0x00, 0x2ae408d4)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,uint256,address)`.\\n mstore(0x00, 0x54a7a9a0)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,uint256,bool)`.\\n mstore(0x00, 0x619e4d0e)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,bool,uint256,uint256)`.\\n mstore(0x00, 0x0bb00eab)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,bool,uint256,string)`.\\n mstore(0x00, 0x7dd4d0e0)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,bool,string,address)`.\\n mstore(0x00, 0xf9ad2b89)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,bool,string,bool)`.\\n mstore(0x00, 0xb857163a)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,bool,string,uint256)`.\\n mstore(0x00, 0xe3a9ca2f)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,bool,string,string)`.\\n mstore(0x00, 0x6d1e8751)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,address,address)`.\\n mstore(0x00, 0x26f560a8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,address,bool)`.\\n mstore(0x00, 0xb4c314ff)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,address,uint256)`.\\n mstore(0x00, 0x1537dc87)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,uint256,address,string)`.\\n mstore(0x00, 0x1bb3b09a)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,bool,address)`.\\n mstore(0x00, 0x9acd3616)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,bool,bool)`.\\n mstore(0x00, 0xceb5f4d7)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,bool,uint256)`.\\n mstore(0x00, 0x7f9bbca2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,uint256,bool,string)`.\\n mstore(0x00, 0x9143dbb1)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,uint256,address)`.\\n mstore(0x00, 0x00dd87b9)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,uint256,bool)`.\\n mstore(0x00, 0xbe984353)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(bool,uint256,uint256,uint256)`.\\n mstore(0x00, 0x374bb4b2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,uint256,uint256,string)`.\\n mstore(0x00, 0x8e69fb5d)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,uint256,string,address)`.\\n mstore(0x00, 0xfedd1fff)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,uint256,string,bool)`.\\n mstore(0x00, 0xe5e70b2b)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,uint256,string,uint256)`.\\n mstore(0x00, 0x6a1199e2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,uint256,string,string)`.\\n mstore(0x00, 0xf5bc2249)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,address,address)`.\\n mstore(0x00, 0x2b2b18dc)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,address,bool)`.\\n mstore(0x00, 0x6dd434ca)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,address,uint256)`.\\n mstore(0x00, 0xa5cada94)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,string,address,string)`.\\n mstore(0x00, 0x12d6c788)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,bool,address)`.\\n mstore(0x00, 0x538e06ab)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,bool,bool)`.\\n mstore(0x00, 0xdc5e935b)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,bool,uint256)`.\\n mstore(0x00, 0x1606a393)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,string,bool,string)`.\\n mstore(0x00, 0x483d0416)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,uint256,address)`.\\n mstore(0x00, 0x1596a1ce)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,uint256,bool)`.\\n mstore(0x00, 0x6b0e5d53)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(bool,string,uint256,uint256)`.\\n mstore(0x00, 0x28863fcb)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,string,uint256,string)`.\\n mstore(0x00, 0x1ad96de6)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,string,string,address)`.\\n mstore(0x00, 0x97d394d8)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,string,string,bool)`.\\n mstore(0x00, 0x1e4b87e5)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(bool,string,string,uint256)`.\\n mstore(0x00, 0x7be0c3eb)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(bool,string,string,string)`.\\n mstore(0x00, 0x1762e32a)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,address,address)`.\\n mstore(0x00, 0x2488b414)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,address,bool)`.\\n mstore(0x00, 0x091ffaf5)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,address,uint256)`.\\n mstore(0x00, 0x736efbb6)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,address,address,string)`.\\n mstore(0x00, 0x031c6f73)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,bool,address)`.\\n mstore(0x00, 0xef72c513)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,bool,bool)`.\\n mstore(0x00, 0xe351140f)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,bool,uint256)`.\\n mstore(0x00, 0x5abd992a)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,address,bool,string)`.\\n mstore(0x00, 0x90fb06aa)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,uint256,address)`.\\n mstore(0x00, 0x15c127b5)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,uint256,bool)`.\\n mstore(0x00, 0x5f743a7c)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,address,uint256,uint256)`.\\n mstore(0x00, 0x0c9cd9c1)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,address,uint256,string)`.\\n mstore(0x00, 0xddb06521)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,address,string,address)`.\\n mstore(0x00, 0x9cba8fff)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,address,string,bool)`.\\n mstore(0x00, 0xcc32ab07)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,address,string,uint256)`.\\n mstore(0x00, 0x46826b5d)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,address,string,string)`.\\n mstore(0x00, 0x3e128ca3)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,address,address)`.\\n mstore(0x00, 0xa1ef4cbb)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,address,bool)`.\\n mstore(0x00, 0x454d54a5)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,address,uint256)`.\\n mstore(0x00, 0x078287f5)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,bool,address,string)`.\\n mstore(0x00, 0xade052c7)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,bool,address)`.\\n mstore(0x00, 0x69640b59)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,bool,bool)`.\\n mstore(0x00, 0xb6f577a1)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,bool,uint256)`.\\n mstore(0x00, 0x7464ce23)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,bool,bool,string)`.\\n mstore(0x00, 0xdddb9561)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,uint256,address)`.\\n mstore(0x00, 0x88cb6041)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,uint256,bool)`.\\n mstore(0x00, 0x91a02e2a)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,bool,uint256,uint256)`.\\n mstore(0x00, 0xc6acc7a8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,bool,uint256,string)`.\\n mstore(0x00, 0xde03e774)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,bool,string,address)`.\\n mstore(0x00, 0xef529018)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,bool,string,bool)`.\\n mstore(0x00, 0xeb928d7f)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,bool,string,uint256)`.\\n mstore(0x00, 0x2c1d0746)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,bool,string,string)`.\\n mstore(0x00, 0x68c8b8bd)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,address,address)`.\\n mstore(0x00, 0x56a5d1b1)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,address,bool)`.\\n mstore(0x00, 0x15cac476)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,address,uint256)`.\\n mstore(0x00, 0x88f6e4b2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,uint256,address,string)`.\\n mstore(0x00, 0x6cde40b8)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,bool,address)`.\\n mstore(0x00, 0x9a816a83)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,bool,bool)`.\\n mstore(0x00, 0xab085ae6)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,bool,uint256)`.\\n mstore(0x00, 0xeb7f6fd2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,uint256,bool,string)`.\\n mstore(0x00, 0xa5b4fc99)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,uint256,address)`.\\n mstore(0x00, 0xfa8185af)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,uint256,bool)`.\\n mstore(0x00, 0xc598d185)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n assembly {\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n // Selector of `log(uint256,uint256,uint256,uint256)`.\\n mstore(0x00, 0x193fb800)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n }\\n _sendLogPayload(0x1c, 0x84);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,uint256,uint256,string)`.\\n mstore(0x00, 0x59cfcbe3)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0x80)\\n writeString(0xa0, p3)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,uint256,string,address)`.\\n mstore(0x00, 0x42d21db7)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,uint256,string,bool)`.\\n mstore(0x00, 0x7af6ab25)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,uint256,string,uint256)`.\\n mstore(0x00, 0x5da297eb)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, p3)\\n writeString(0xa0, p2)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,uint256,string,string)`.\\n mstore(0x00, 0x27d8afd2)\\n mstore(0x20, p0)\\n mstore(0x40, p1)\\n mstore(0x60, 0x80)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p2)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,address,address)`.\\n mstore(0x00, 0x6168ed61)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,address,bool)`.\\n mstore(0x00, 0x90c30a56)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,address,uint256)`.\\n mstore(0x00, 0xe8d3018d)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,string,address,string)`.\\n mstore(0x00, 0x9c3adfa1)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,bool,address)`.\\n mstore(0x00, 0xae2ec581)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,bool,bool)`.\\n mstore(0x00, 0xba535d9c)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,bool,uint256)`.\\n mstore(0x00, 0xcf009880)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,string,bool,string)`.\\n mstore(0x00, 0xd2d423cd)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,uint256,address)`.\\n mstore(0x00, 0x3b2279b4)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,uint256,bool)`.\\n mstore(0x00, 0x691a8f74)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(uint256,string,uint256,uint256)`.\\n mstore(0x00, 0x82c25b74)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,string,uint256,string)`.\\n mstore(0x00, 0xb7b914ca)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p1)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,string,string,address)`.\\n mstore(0x00, 0xd583c602)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,string,string,bool)`.\\n mstore(0x00, 0xb3a6b6bd)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(uint256,string,string,uint256)`.\\n mstore(0x00, 0xb028c9bd)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(uint256,string,string,string)`.\\n mstore(0x00, 0x21ad0683)\\n mstore(0x20, p0)\\n mstore(0x40, 0x80)\\n mstore(0x60, 0xc0)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p1)\\n writeString(0xe0, p2)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,address,address)`.\\n mstore(0x00, 0xed8f28f6)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,address,bool)`.\\n mstore(0x00, 0xb59dbd60)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,address,uint256)`.\\n mstore(0x00, 0x8ef3f399)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,address,address,string)`.\\n mstore(0x00, 0x800a1c67)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,bool,address)`.\\n mstore(0x00, 0x223603bd)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,bool,bool)`.\\n mstore(0x00, 0x79884c2b)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,bool,uint256)`.\\n mstore(0x00, 0x3e9f866a)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,address,bool,string)`.\\n mstore(0x00, 0x0454c079)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,uint256,address)`.\\n mstore(0x00, 0x63fb8bc5)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,uint256,bool)`.\\n mstore(0x00, 0xfc4845f0)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,address,uint256,uint256)`.\\n mstore(0x00, 0xf8f51b1e)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,address,uint256,string)`.\\n mstore(0x00, 0x5a477632)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,address,string,address)`.\\n mstore(0x00, 0xaabc9a31)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,address,string,bool)`.\\n mstore(0x00, 0x5f15d28c)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,address,string,uint256)`.\\n mstore(0x00, 0x91d1112e)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,address,string,string)`.\\n mstore(0x00, 0x245986f2)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,address,address)`.\\n mstore(0x00, 0x33e9dd1d)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,address,bool)`.\\n mstore(0x00, 0x958c28c6)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,address,uint256)`.\\n mstore(0x00, 0x5d08bb05)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,bool,address,string)`.\\n mstore(0x00, 0x2d8e33a4)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,bool,address)`.\\n mstore(0x00, 0x7190a529)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,bool,bool)`.\\n mstore(0x00, 0x895af8c5)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,bool,uint256)`.\\n mstore(0x00, 0x8e3f78a9)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,bool,bool,string)`.\\n mstore(0x00, 0x9d22d5dd)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,uint256,address)`.\\n mstore(0x00, 0x935e09bf)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,uint256,bool)`.\\n mstore(0x00, 0x8af7cf8a)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,bool,uint256,uint256)`.\\n mstore(0x00, 0x64b5bb67)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,bool,uint256,string)`.\\n mstore(0x00, 0x742d6ee7)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,bool,string,address)`.\\n mstore(0x00, 0xe0625b29)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,bool,string,bool)`.\\n mstore(0x00, 0x3f8a701d)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,bool,string,uint256)`.\\n mstore(0x00, 0x24f91465)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,bool,string,string)`.\\n mstore(0x00, 0xa826caeb)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,address,address)`.\\n mstore(0x00, 0x5ea2b7ae)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,address,bool)`.\\n mstore(0x00, 0x82112a42)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,address,uint256)`.\\n mstore(0x00, 0x4f04fdc6)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,uint256,address,string)`.\\n mstore(0x00, 0x9ffb2f93)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,bool,address)`.\\n mstore(0x00, 0xe0e95b98)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,bool,bool)`.\\n mstore(0x00, 0x354c36d6)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,bool,uint256)`.\\n mstore(0x00, 0xe41b6f6f)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,uint256,bool,string)`.\\n mstore(0x00, 0xabf73a98)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,uint256,address)`.\\n mstore(0x00, 0xe21de278)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,uint256,bool)`.\\n mstore(0x00, 0x7626db92)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n // Selector of `log(string,uint256,uint256,uint256)`.\\n mstore(0x00, 0xa7a87853)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n }\\n _sendLogPayload(0x1c, 0xc4);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,uint256,uint256,string)`.\\n mstore(0x00, 0x854b3496)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, p2)\\n mstore(0x80, 0xc0)\\n writeString(0xa0, p0)\\n writeString(0xe0, p3)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,uint256,string,address)`.\\n mstore(0x00, 0x7c4632a4)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,uint256,string,bool)`.\\n mstore(0x00, 0x7d24491d)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,uint256,string,uint256)`.\\n mstore(0x00, 0xc67ea9d1)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,uint256,string,string)`.\\n mstore(0x00, 0x5ab84e1f)\\n mstore(0x20, 0x80)\\n mstore(0x40, p1)\\n mstore(0x60, 0xc0)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p0)\\n writeString(0xe0, p2)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,address,address)`.\\n mstore(0x00, 0x439c7bef)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,address,bool)`.\\n mstore(0x00, 0x5ccd4e37)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,address,uint256)`.\\n mstore(0x00, 0x7cc3c607)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,string,address,string)`.\\n mstore(0x00, 0xeb1bff80)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,bool,address)`.\\n mstore(0x00, 0xc371c7db)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,bool,bool)`.\\n mstore(0x00, 0x40785869)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,bool,uint256)`.\\n mstore(0x00, 0xd6aefad2)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,string,bool,string)`.\\n mstore(0x00, 0x5e84b0ea)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,uint256,address)`.\\n mstore(0x00, 0x1023f7b2)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,uint256,bool)`.\\n mstore(0x00, 0xc3a8a654)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n // Selector of `log(string,string,uint256,uint256)`.\\n mstore(0x00, 0xf45d7d2c)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n }\\n _sendLogPayload(0x1c, 0x104);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,string,uint256,string)`.\\n mstore(0x00, 0x5d1a971a)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, p2)\\n mstore(0x80, 0x100)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n writeString(0x120, p3)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,string,string,address)`.\\n mstore(0x00, 0x6d572f44)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, 0x100)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n writeString(0x120, p2)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,string,string,bool)`.\\n mstore(0x00, 0x2c1754ed)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, 0x100)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n writeString(0x120, p2)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n // Selector of `log(string,string,string,uint256)`.\\n mstore(0x00, 0x8eafb02b)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, 0x100)\\n mstore(0x80, p3)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n writeString(0x120, p2)\\n }\\n _sendLogPayload(0x1c, 0x144);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n }\\n }\\n\\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\\n bytes32 m0;\\n bytes32 m1;\\n bytes32 m2;\\n bytes32 m3;\\n bytes32 m4;\\n bytes32 m5;\\n bytes32 m6;\\n bytes32 m7;\\n bytes32 m8;\\n bytes32 m9;\\n bytes32 m10;\\n bytes32 m11;\\n bytes32 m12;\\n assembly {\\n function writeString(pos, w) {\\n let length := 0\\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\\n mstore(pos, length)\\n let shift := sub(256, shl(3, length))\\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\\n }\\n m0 := mload(0x00)\\n m1 := mload(0x20)\\n m2 := mload(0x40)\\n m3 := mload(0x60)\\n m4 := mload(0x80)\\n m5 := mload(0xa0)\\n m6 := mload(0xc0)\\n m7 := mload(0xe0)\\n m8 := mload(0x100)\\n m9 := mload(0x120)\\n m10 := mload(0x140)\\n m11 := mload(0x160)\\n m12 := mload(0x180)\\n // Selector of `log(string,string,string,string)`.\\n mstore(0x00, 0xde68f20a)\\n mstore(0x20, 0x80)\\n mstore(0x40, 0xc0)\\n mstore(0x60, 0x100)\\n mstore(0x80, 0x140)\\n writeString(0xa0, p0)\\n writeString(0xe0, p1)\\n writeString(0x120, p2)\\n writeString(0x160, p3)\\n }\\n _sendLogPayload(0x1c, 0x184);\\n assembly {\\n mstore(0x00, m0)\\n mstore(0x20, m1)\\n mstore(0x40, m2)\\n mstore(0x60, m3)\\n mstore(0x80, m4)\\n mstore(0xa0, m5)\\n mstore(0xc0, m6)\\n mstore(0xe0, m7)\\n mstore(0x100, m8)\\n mstore(0x120, m9)\\n mstore(0x140, m10)\\n mstore(0x160, m11)\\n mstore(0x180, m12)\\n }\\n }\\n}\\n\"\n },\n \"forge-std/StdAssertions.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\nimport {DSTest} from \\\"ds-test/test.sol\\\";\\nimport {stdMath} from \\\"./StdMath.sol\\\";\\n\\nabstract contract StdAssertions is DSTest {\\n event log_array(uint256[] val);\\n event log_array(int256[] val);\\n event log_array(address[] val);\\n event log_named_array(string key, uint256[] val);\\n event log_named_array(string key, int256[] val);\\n event log_named_array(string key, address[] val);\\n\\n function fail(string memory err) internal virtual {\\n emit log_named_string(\\\"Error\\\", err);\\n fail();\\n }\\n\\n function assertFalse(bool data) internal virtual {\\n assertTrue(!data);\\n }\\n\\n function assertFalse(bool data, string memory err) internal virtual {\\n assertTrue(!data, err);\\n }\\n\\n function assertEq(bool a, bool b) internal virtual {\\n if (a != b) {\\n emit log(\\\"Error: a == b not satisfied [bool]\\\");\\n emit log_named_string(\\\" Left\\\", a ? \\\"true\\\" : \\\"false\\\");\\n emit log_named_string(\\\" Right\\\", b ? \\\"true\\\" : \\\"false\\\");\\n fail();\\n }\\n }\\n\\n function assertEq(bool a, bool b, string memory err) internal virtual {\\n if (a != b) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n\\n function assertEq(bytes memory a, bytes memory b) internal virtual {\\n assertEq0(a, b);\\n }\\n\\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\\n assertEq0(a, b, err);\\n }\\n\\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\\n emit log(\\\"Error: a == b not satisfied [uint[]]\\\");\\n emit log_named_array(\\\" Left\\\", a);\\n emit log_named_array(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n\\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\\n emit log(\\\"Error: a == b not satisfied [int[]]\\\");\\n emit log_named_array(\\\" Left\\\", a);\\n emit log_named_array(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n\\n function assertEq(address[] memory a, address[] memory b) internal virtual {\\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\\n emit log(\\\"Error: a == b not satisfied [address[]]\\\");\\n emit log_named_array(\\\" Left\\\", a);\\n emit log_named_array(\\\" Right\\\", b);\\n fail();\\n }\\n }\\n\\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n\\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n\\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertEq(a, b);\\n }\\n }\\n\\n // Legacy helper\\n function assertEqUint(uint256 a, uint256 b) internal virtual {\\n assertEq(uint256(a), uint256(b));\\n }\\n\\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\\n uint256 delta = stdMath.delta(a, b);\\n\\n if (delta > maxDelta) {\\n emit log(\\\"Error: a ~= b not satisfied [uint]\\\");\\n emit log_named_uint(\\\" Left\\\", a);\\n emit log_named_uint(\\\" Right\\\", b);\\n emit log_named_uint(\\\" Max Delta\\\", maxDelta);\\n emit log_named_uint(\\\" Delta\\\", delta);\\n fail();\\n }\\n }\\n\\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\\n uint256 delta = stdMath.delta(a, b);\\n\\n if (delta > maxDelta) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertApproxEqAbs(a, b, maxDelta);\\n }\\n }\\n\\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\\n uint256 delta = stdMath.delta(a, b);\\n\\n if (delta > maxDelta) {\\n emit log(\\\"Error: a ~= b not satisfied [uint]\\\");\\n emit log_named_decimal_uint(\\\" Left\\\", a, decimals);\\n emit log_named_decimal_uint(\\\" Right\\\", b, decimals);\\n emit log_named_decimal_uint(\\\" Max Delta\\\", maxDelta, decimals);\\n emit log_named_decimal_uint(\\\" Delta\\\", delta, decimals);\\n fail();\\n }\\n }\\n\\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\\n internal\\n virtual\\n {\\n uint256 delta = stdMath.delta(a, b);\\n\\n if (delta > maxDelta) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\\n }\\n }\\n\\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\\n uint256 delta = stdMath.delta(a, b);\\n\\n if (delta > maxDelta) {\\n emit log(\\\"Error: a ~= b not satisfied [int]\\\");\\n emit log_named_int(\\\" Left\\\", a);\\n emit log_named_int(\\\" Right\\\", b);\\n emit log_named_uint(\\\" Max Delta\\\", maxDelta);\\n emit log_named_uint(\\\" Delta\\\", delta);\\n fail();\\n }\\n }\\n\\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\\n uint256 delta = stdMath.delta(a, b);\\n\\n if (delta > maxDelta) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertApproxEqAbs(a, b, maxDelta);\\n }\\n }\\n\\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\\n uint256 delta = stdMath.delta(a, b);\\n\\n if (delta > maxDelta) {\\n emit log(\\\"Error: a ~= b not satisfied [int]\\\");\\n emit log_named_decimal_int(\\\" Left\\\", a, decimals);\\n emit log_named_decimal_int(\\\" Right\\\", b, decimals);\\n emit log_named_decimal_uint(\\\" Max Delta\\\", maxDelta, decimals);\\n emit log_named_decimal_uint(\\\" Delta\\\", delta, decimals);\\n fail();\\n }\\n }\\n\\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\\n internal\\n virtual\\n {\\n uint256 delta = stdMath.delta(a, b);\\n\\n if (delta > maxDelta) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\\n }\\n }\\n\\n function assertApproxEqRel(\\n uint256 a,\\n uint256 b,\\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\\n ) internal virtual {\\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\\n\\n uint256 percentDelta = stdMath.percentDelta(a, b);\\n\\n if (percentDelta > maxPercentDelta) {\\n emit log(\\\"Error: a ~= b not satisfied [uint]\\\");\\n emit log_named_uint(\\\" Left\\\", a);\\n emit log_named_uint(\\\" Right\\\", b);\\n emit log_named_decimal_uint(\\\" Max % Delta\\\", maxPercentDelta * 100, 18);\\n emit log_named_decimal_uint(\\\" % Delta\\\", percentDelta * 100, 18);\\n fail();\\n }\\n }\\n\\n function assertApproxEqRel(\\n uint256 a,\\n uint256 b,\\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\\n string memory err\\n ) internal virtual {\\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\\n\\n uint256 percentDelta = stdMath.percentDelta(a, b);\\n\\n if (percentDelta > maxPercentDelta) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertApproxEqRel(a, b, maxPercentDelta);\\n }\\n }\\n\\n function assertApproxEqRelDecimal(\\n uint256 a,\\n uint256 b,\\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\\n uint256 decimals\\n ) internal virtual {\\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\\n\\n uint256 percentDelta = stdMath.percentDelta(a, b);\\n\\n if (percentDelta > maxPercentDelta) {\\n emit log(\\\"Error: a ~= b not satisfied [uint]\\\");\\n emit log_named_decimal_uint(\\\" Left\\\", a, decimals);\\n emit log_named_decimal_uint(\\\" Right\\\", b, decimals);\\n emit log_named_decimal_uint(\\\" Max % Delta\\\", maxPercentDelta * 100, 18);\\n emit log_named_decimal_uint(\\\" % Delta\\\", percentDelta * 100, 18);\\n fail();\\n }\\n }\\n\\n function assertApproxEqRelDecimal(\\n uint256 a,\\n uint256 b,\\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\\n uint256 decimals,\\n string memory err\\n ) internal virtual {\\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\\n\\n uint256 percentDelta = stdMath.percentDelta(a, b);\\n\\n if (percentDelta > maxPercentDelta) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\\n }\\n }\\n\\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\\n\\n uint256 percentDelta = stdMath.percentDelta(a, b);\\n\\n if (percentDelta > maxPercentDelta) {\\n emit log(\\\"Error: a ~= b not satisfied [int]\\\");\\n emit log_named_int(\\\" Left\\\", a);\\n emit log_named_int(\\\" Right\\\", b);\\n emit log_named_decimal_uint(\\\" Max % Delta\\\", maxPercentDelta * 100, 18);\\n emit log_named_decimal_uint(\\\" % Delta\\\", percentDelta * 100, 18);\\n fail();\\n }\\n }\\n\\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\\n\\n uint256 percentDelta = stdMath.percentDelta(a, b);\\n\\n if (percentDelta > maxPercentDelta) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertApproxEqRel(a, b, maxPercentDelta);\\n }\\n }\\n\\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\\n\\n uint256 percentDelta = stdMath.percentDelta(a, b);\\n\\n if (percentDelta > maxPercentDelta) {\\n emit log(\\\"Error: a ~= b not satisfied [int]\\\");\\n emit log_named_decimal_int(\\\" Left\\\", a, decimals);\\n emit log_named_decimal_int(\\\" Right\\\", b, decimals);\\n emit log_named_decimal_uint(\\\" Max % Delta\\\", maxPercentDelta * 100, 18);\\n emit log_named_decimal_uint(\\\" % Delta\\\", percentDelta * 100, 18);\\n fail();\\n }\\n }\\n\\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\\n internal\\n virtual\\n {\\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\\n\\n uint256 percentDelta = stdMath.percentDelta(a, b);\\n\\n if (percentDelta > maxPercentDelta) {\\n emit log_named_string(\\\"Error\\\", err);\\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\\n }\\n }\\n\\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\\n assertEqCall(target, callDataA, target, callDataB, true);\\n }\\n\\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\\n internal\\n virtual\\n {\\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\\n }\\n\\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\\n internal\\n virtual\\n {\\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\\n }\\n\\n function assertEqCall(\\n address targetA,\\n bytes memory callDataA,\\n address targetB,\\n bytes memory callDataB,\\n bool strictRevertData\\n ) internal virtual {\\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\\n\\n if (successA && successB) {\\n assertEq(returnDataA, returnDataB, \\\"Call return data does not match\\\");\\n }\\n\\n if (!successA && !successB && strictRevertData) {\\n assertEq(returnDataA, returnDataB, \\\"Call revert data does not match\\\");\\n }\\n\\n if (!successA && successB) {\\n emit log(\\\"Error: Calls were not equal\\\");\\n emit log_named_bytes(\\\" Left call revert data\\\", returnDataA);\\n emit log_named_bytes(\\\" Right call return data\\\", returnDataB);\\n fail();\\n }\\n\\n if (successA && !successB) {\\n emit log(\\\"Error: Calls were not equal\\\");\\n emit log_named_bytes(\\\" Left call return data\\\", returnDataA);\\n emit log_named_bytes(\\\" Right call revert data\\\", returnDataB);\\n fail();\\n }\\n }\\n}\\n\"\n },\n \"forge-std/StdChains.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\nimport {VmSafe} from \\\"./Vm.sol\\\";\\n\\n/**\\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\\n * alias used in this contract, which can be found as the first argument to the\\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\\n *\\n * There are two main ways to use this contract:\\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\\n * `setChain(string memory chainAlias, Chain memory chain)`\\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\\n *\\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\\n * `defaultRpcUrls`.\\n *\\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\\n *\\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\\n * we want to retrieve the RPC URL for `mainnet`:\\n * - If you have specified data with `setChain`, it will return that.\\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\\n * - If neither of the above conditions is met, the default data is returned.\\n *\\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\\n */\\nabstract contract StdChains {\\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\\\"hevm cheat code\\\")))));\\n\\n bool private stdChainsInitialized;\\n\\n struct ChainData {\\n string name;\\n uint256 chainId;\\n string rpcUrl;\\n }\\n\\n struct Chain {\\n // The chain name.\\n string name;\\n // The chain's Chain ID.\\n uint256 chainId;\\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\\n string chainAlias;\\n // A default RPC endpoint for this chain.\\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\\n string rpcUrl;\\n }\\n\\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\\n mapping(string => Chain) private chains;\\n // Maps from the chain's alias to it's default RPC URL.\\n mapping(string => string) private defaultRpcUrls;\\n // Maps from a chain ID to it's alias.\\n mapping(uint256 => string) private idToAlias;\\n\\n bool private fallbackToDefaultRpcUrls = true;\\n\\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\\n require(bytes(chainAlias).length != 0, \\\"StdChains getChain(string): Chain alias cannot be the empty string.\\\");\\n\\n initializeStdChains();\\n chain = chains[chainAlias];\\n require(\\n chain.chainId != 0,\\n string(abi.encodePacked(\\\"StdChains getChain(string): Chain with alias \\\\\\\"\\\", chainAlias, \\\"\\\\\\\" not found.\\\"))\\n );\\n\\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\\n }\\n\\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\\n require(chainId != 0, \\\"StdChains getChain(uint256): Chain ID cannot be 0.\\\");\\n initializeStdChains();\\n string memory chainAlias = idToAlias[chainId];\\n\\n chain = chains[chainAlias];\\n\\n require(\\n chain.chainId != 0,\\n string(abi.encodePacked(\\\"StdChains getChain(uint256): Chain with ID \\\", vm.toString(chainId), \\\" not found.\\\"))\\n );\\n\\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\\n }\\n\\n // set chain info, with priority to argument's rpcUrl field.\\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\\n require(\\n bytes(chainAlias).length != 0,\\n \\\"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\\\"\\n );\\n\\n require(chain.chainId != 0, \\\"StdChains setChain(string,ChainData): Chain ID cannot be 0.\\\");\\n\\n initializeStdChains();\\n string memory foundAlias = idToAlias[chain.chainId];\\n\\n require(\\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\\n string(\\n abi.encodePacked(\\n \\\"StdChains setChain(string,ChainData): Chain ID \\\",\\n vm.toString(chain.chainId),\\n \\\" already used by \\\\\\\"\\\",\\n foundAlias,\\n \\\"\\\\\\\".\\\"\\n )\\n )\\n );\\n\\n uint256 oldChainId = chains[chainAlias].chainId;\\n delete idToAlias[oldChainId];\\n\\n chains[chainAlias] =\\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\\n idToAlias[chain.chainId] = chainAlias;\\n }\\n\\n // set chain info, with priority to argument's rpcUrl field.\\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\\n }\\n\\n function _toUpper(string memory str) private pure returns (string memory) {\\n bytes memory strb = bytes(str);\\n bytes memory copy = new bytes(strb.length);\\n for (uint256 i = 0; i < strb.length; i++) {\\n bytes1 b = strb[i];\\n if (b >= 0x61 && b <= 0x7A) {\\n copy[i] = bytes1(uint8(b) - 32);\\n } else {\\n copy[i] = b;\\n }\\n }\\n return string(copy);\\n }\\n\\n // lookup rpcUrl, in descending order of priority:\\n // current -> config (foundry.toml) -> environment variable -> default\\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\\n if (bytes(chain.rpcUrl).length == 0) {\\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\\n chain.rpcUrl = configRpcUrl;\\n } catch (bytes memory err) {\\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \\\"_RPC_URL\\\"));\\n if (fallbackToDefaultRpcUrls) {\\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\\n } else {\\n chain.rpcUrl = vm.envString(envName);\\n }\\n // Distinguish 'not found' from 'cannot read'\\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\\n bytes memory oldNotFoundError =\\n abi.encodeWithSignature(\\\"CheatCodeError\\\", string(abi.encodePacked(\\\"invalid rpc url \\\", chainAlias)));\\n bytes memory newNotFoundError = abi.encodeWithSignature(\\n \\\"CheatcodeError(string)\\\", string(abi.encodePacked(\\\"invalid rpc url: \\\", chainAlias))\\n );\\n bytes32 errHash = keccak256(err);\\n if (\\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\\n || bytes(chain.rpcUrl).length == 0\\n ) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, err), mload(err))\\n }\\n }\\n }\\n }\\n return chain;\\n }\\n\\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\\n fallbackToDefaultRpcUrls = useDefault;\\n }\\n\\n function initializeStdChains() private {\\n if (stdChainsInitialized) return;\\n\\n stdChainsInitialized = true;\\n\\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\\n setChainWithDefaultRpcUrl(\\\"anvil\\\", ChainData(\\\"Anvil\\\", 31337, \\\"http://127.0.0.1:8545\\\"));\\n setChainWithDefaultRpcUrl(\\n \\\"mainnet\\\", ChainData(\\\"Mainnet\\\", 1, \\\"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\\\")\\n );\\n setChainWithDefaultRpcUrl(\\n \\\"goerli\\\", ChainData(\\\"Goerli\\\", 5, \\\"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\\\")\\n );\\n setChainWithDefaultRpcUrl(\\n \\\"sepolia\\\", ChainData(\\\"Sepolia\\\", 11155111, \\\"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\\\")\\n );\\n setChainWithDefaultRpcUrl(\\\"optimism\\\", ChainData(\\\"Optimism\\\", 10, \\\"https://mainnet.optimism.io\\\"));\\n setChainWithDefaultRpcUrl(\\\"optimism_goerli\\\", ChainData(\\\"Optimism Goerli\\\", 420, \\\"https://goerli.optimism.io\\\"));\\n setChainWithDefaultRpcUrl(\\\"arbitrum_one\\\", ChainData(\\\"Arbitrum One\\\", 42161, \\\"https://arb1.arbitrum.io/rpc\\\"));\\n setChainWithDefaultRpcUrl(\\n \\\"arbitrum_one_goerli\\\", ChainData(\\\"Arbitrum One Goerli\\\", 421613, \\\"https://goerli-rollup.arbitrum.io/rpc\\\")\\n );\\n setChainWithDefaultRpcUrl(\\\"arbitrum_nova\\\", ChainData(\\\"Arbitrum Nova\\\", 42170, \\\"https://nova.arbitrum.io/rpc\\\"));\\n setChainWithDefaultRpcUrl(\\\"polygon\\\", ChainData(\\\"Polygon\\\", 137, \\\"https://polygon-rpc.com\\\"));\\n setChainWithDefaultRpcUrl(\\n \\\"polygon_mumbai\\\", ChainData(\\\"Polygon Mumbai\\\", 80001, \\\"https://rpc-mumbai.maticvigil.com\\\")\\n );\\n setChainWithDefaultRpcUrl(\\\"avalanche\\\", ChainData(\\\"Avalanche\\\", 43114, \\\"https://api.avax.network/ext/bc/C/rpc\\\"));\\n setChainWithDefaultRpcUrl(\\n \\\"avalanche_fuji\\\", ChainData(\\\"Avalanche Fuji\\\", 43113, \\\"https://api.avax-test.network/ext/bc/C/rpc\\\")\\n );\\n setChainWithDefaultRpcUrl(\\n \\\"bnb_smart_chain\\\", ChainData(\\\"BNB Smart Chain\\\", 56, \\\"https://bsc-dataseed1.binance.org\\\")\\n );\\n setChainWithDefaultRpcUrl(\\n \\\"bnb_smart_chain_testnet\\\",\\n ChainData(\\\"BNB Smart Chain Testnet\\\", 97, \\\"https://rpc.ankr.com/bsc_testnet_chapel\\\")\\n );\\n setChainWithDefaultRpcUrl(\\\"gnosis_chain\\\", ChainData(\\\"Gnosis Chain\\\", 100, \\\"https://rpc.gnosischain.com\\\"));\\n setChainWithDefaultRpcUrl(\\\"moonbeam\\\", ChainData(\\\"Moonbeam\\\", 1284, \\\"https://rpc.api.moonbeam.network\\\"));\\n setChainWithDefaultRpcUrl(\\n \\\"moonriver\\\", ChainData(\\\"Moonriver\\\", 1285, \\\"https://rpc.api.moonriver.moonbeam.network\\\")\\n );\\n setChainWithDefaultRpcUrl(\\\"moonbase\\\", ChainData(\\\"Moonbase\\\", 1287, \\\"https://rpc.testnet.moonbeam.network\\\"));\\n setChainWithDefaultRpcUrl(\\\"base_goerli\\\", ChainData(\\\"Base Goerli\\\", 84531, \\\"https://goerli.base.org\\\"));\\n setChainWithDefaultRpcUrl(\\\"base\\\", ChainData(\\\"Base\\\", 8453, \\\"https://mainnet.base.org\\\"));\\n }\\n\\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\\n string memory rpcUrl = chain.rpcUrl;\\n defaultRpcUrls[chainAlias] = rpcUrl;\\n chain.rpcUrl = \\\"\\\";\\n setChain(chainAlias, chain);\\n chain.rpcUrl = rpcUrl; // restore argument\\n }\\n}\\n\"\n },\n \"forge-std/StdCheats.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\npragma experimental ABIEncoderV2;\\n\\nimport {StdStorage, stdStorage} from \\\"./StdStorage.sol\\\";\\nimport {console2} from \\\"./console2.sol\\\";\\nimport {Vm} from \\\"./Vm.sol\\\";\\n\\nabstract contract StdCheatsSafe {\\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\\\"hevm cheat code\\\")))));\\n\\n uint256 private constant UINT256_MAX =\\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\\n\\n bool private gasMeteringOff;\\n\\n // Data structures to parse Transaction objects from the broadcast artifact\\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\\n // and then converted to the one that is used by the user for better UX.\\n\\n struct RawTx1559 {\\n string[] arguments;\\n address contractAddress;\\n string contractName;\\n // json value name = function\\n string functionSig;\\n bytes32 hash;\\n // json value name = tx\\n RawTx1559Detail txDetail;\\n // json value name = type\\n string opcode;\\n }\\n\\n struct RawTx1559Detail {\\n AccessList[] accessList;\\n bytes data;\\n address from;\\n bytes gas;\\n bytes nonce;\\n address to;\\n bytes txType;\\n bytes value;\\n }\\n\\n struct Tx1559 {\\n string[] arguments;\\n address contractAddress;\\n string contractName;\\n string functionSig;\\n bytes32 hash;\\n Tx1559Detail txDetail;\\n string opcode;\\n }\\n\\n struct Tx1559Detail {\\n AccessList[] accessList;\\n bytes data;\\n address from;\\n uint256 gas;\\n uint256 nonce;\\n address to;\\n uint256 txType;\\n uint256 value;\\n }\\n\\n // Data structures to parse Transaction objects from the broadcast artifact\\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\\n // and then converted to the one that is used by the user for better UX.\\n\\n struct TxLegacy {\\n string[] arguments;\\n address contractAddress;\\n string contractName;\\n string functionSig;\\n string hash;\\n string opcode;\\n TxDetailLegacy transaction;\\n }\\n\\n struct TxDetailLegacy {\\n AccessList[] accessList;\\n uint256 chainId;\\n bytes data;\\n address from;\\n uint256 gas;\\n uint256 gasPrice;\\n bytes32 hash;\\n uint256 nonce;\\n bytes1 opcode;\\n bytes32 r;\\n bytes32 s;\\n uint256 txType;\\n address to;\\n uint8 v;\\n uint256 value;\\n }\\n\\n struct AccessList {\\n address accessAddress;\\n bytes32[] storageKeys;\\n }\\n\\n // Data structures to parse Receipt objects from the broadcast artifact.\\n // The Raw structs is what is parsed from the JSON\\n // and then converted to the one that is used by the user for better UX.\\n\\n struct RawReceipt {\\n bytes32 blockHash;\\n bytes blockNumber;\\n address contractAddress;\\n bytes cumulativeGasUsed;\\n bytes effectiveGasPrice;\\n address from;\\n bytes gasUsed;\\n RawReceiptLog[] logs;\\n bytes logsBloom;\\n bytes status;\\n address to;\\n bytes32 transactionHash;\\n bytes transactionIndex;\\n }\\n\\n struct Receipt {\\n bytes32 blockHash;\\n uint256 blockNumber;\\n address contractAddress;\\n uint256 cumulativeGasUsed;\\n uint256 effectiveGasPrice;\\n address from;\\n uint256 gasUsed;\\n ReceiptLog[] logs;\\n bytes logsBloom;\\n uint256 status;\\n address to;\\n bytes32 transactionHash;\\n uint256 transactionIndex;\\n }\\n\\n // Data structures to parse the entire broadcast artifact, assuming the\\n // transactions conform to EIP1559.\\n\\n struct EIP1559ScriptArtifact {\\n string[] libraries;\\n string path;\\n string[] pending;\\n Receipt[] receipts;\\n uint256 timestamp;\\n Tx1559[] transactions;\\n TxReturn[] txReturns;\\n }\\n\\n struct RawEIP1559ScriptArtifact {\\n string[] libraries;\\n string path;\\n string[] pending;\\n RawReceipt[] receipts;\\n TxReturn[] txReturns;\\n uint256 timestamp;\\n RawTx1559[] transactions;\\n }\\n\\n struct RawReceiptLog {\\n // json value = address\\n address logAddress;\\n bytes32 blockHash;\\n bytes blockNumber;\\n bytes data;\\n bytes logIndex;\\n bool removed;\\n bytes32[] topics;\\n bytes32 transactionHash;\\n bytes transactionIndex;\\n bytes transactionLogIndex;\\n }\\n\\n struct ReceiptLog {\\n // json value = address\\n address logAddress;\\n bytes32 blockHash;\\n uint256 blockNumber;\\n bytes data;\\n uint256 logIndex;\\n bytes32[] topics;\\n uint256 transactionIndex;\\n uint256 transactionLogIndex;\\n bool removed;\\n }\\n\\n struct TxReturn {\\n string internalType;\\n string value;\\n }\\n\\n struct Account {\\n address addr;\\n uint256 key;\\n }\\n\\n enum AddressType {\\n Payable,\\n NonPayable,\\n ZeroAddress,\\n Precompile,\\n ForgeAddress\\n }\\n\\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\\n // Nothing to check if `token` is not a contract.\\n uint256 tokenCodeSize;\\n assembly {\\n tokenCodeSize := extcodesize(token)\\n }\\n require(tokenCodeSize > 0, \\\"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\\\");\\n\\n bool success;\\n bytes memory returnData;\\n\\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\\n\\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\\n }\\n\\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\\n // backwards compatibility, since this name was used in the original PR which has already has\\n // a release. This function can be removed in a future release once we want a breaking change.\\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\\n assumeNotBlacklisted(token, addr);\\n }\\n\\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\\n if (addressType == AddressType.Payable) {\\n assumeNotPayable(addr);\\n } else if (addressType == AddressType.NonPayable) {\\n assumePayable(addr);\\n } else if (addressType == AddressType.ZeroAddress) {\\n assumeNotZeroAddress(addr);\\n } else if (addressType == AddressType.Precompile) {\\n assumeNotPrecompile(addr);\\n } else if (addressType == AddressType.ForgeAddress) {\\n assumeNotForgeAddress(addr);\\n }\\n }\\n\\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\\n assumeAddressIsNot(addr, addressType1);\\n assumeAddressIsNot(addr, addressType2);\\n }\\n\\n function assumeAddressIsNot(\\n address addr,\\n AddressType addressType1,\\n AddressType addressType2,\\n AddressType addressType3\\n ) internal virtual {\\n assumeAddressIsNot(addr, addressType1);\\n assumeAddressIsNot(addr, addressType2);\\n assumeAddressIsNot(addr, addressType3);\\n }\\n\\n function assumeAddressIsNot(\\n address addr,\\n AddressType addressType1,\\n AddressType addressType2,\\n AddressType addressType3,\\n AddressType addressType4\\n ) internal virtual {\\n assumeAddressIsNot(addr, addressType1);\\n assumeAddressIsNot(addr, addressType2);\\n assumeAddressIsNot(addr, addressType3);\\n assumeAddressIsNot(addr, addressType4);\\n }\\n\\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\\n // `addr` and checking the `success` return value.\\n // NOTE: This function may result in state changes depending on the fallback/receive logic\\n // implemented by `addr`, which should be taken into account when this function is used.\\n function _isPayable(address addr) private returns (bool) {\\n require(\\n addr.balance < UINT256_MAX,\\n \\\"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\\\"\\n );\\n uint256 origBalanceTest = address(this).balance;\\n uint256 origBalanceAddr = address(addr).balance;\\n\\n vm.deal(address(this), 1);\\n (bool success,) = payable(addr).call{value: 1}(\\\"\\\");\\n\\n // reset balances\\n vm.deal(address(this), origBalanceTest);\\n vm.deal(addr, origBalanceAddr);\\n\\n return success;\\n }\\n\\n // NOTE: This function may result in state changes depending on the fallback/receive logic\\n // implemented by `addr`, which should be taken into account when this function is used. See the\\n // `_isPayable` method for more information.\\n function assumePayable(address addr) internal virtual {\\n vm.assume(_isPayable(addr));\\n }\\n\\n function assumeNotPayable(address addr) internal virtual {\\n vm.assume(!_isPayable(addr));\\n }\\n\\n function assumeNotZeroAddress(address addr) internal pure virtual {\\n vm.assume(addr != address(0));\\n }\\n\\n function assumeNotPrecompile(address addr) internal pure virtual {\\n assumeNotPrecompile(addr, _pureChainId());\\n }\\n\\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\\n // address), but the same rationale for excluding them applies so we include those too.\\n\\n // These should be present on all EVM-compatible chains.\\n vm.assume(addr < address(0x1) || addr > address(0x9));\\n\\n // forgefmt: disable-start\\n if (chainId == 10 || chainId == 420) {\\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\\n } else if (chainId == 42161 || chainId == 421613) {\\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\\n } else if (chainId == 43114 || chainId == 43113) {\\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\\n }\\n // forgefmt: disable-end\\n }\\n\\n function assumeNotForgeAddress(address addr) internal pure virtual {\\n // vm, console, and Create2Deployer addresses\\n vm.assume(\\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\\n );\\n }\\n\\n function readEIP1559ScriptArtifact(string memory path)\\n internal\\n view\\n virtual\\n returns (EIP1559ScriptArtifact memory)\\n {\\n string memory data = vm.readFile(path);\\n bytes memory parsedData = vm.parseJson(data);\\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\\n EIP1559ScriptArtifact memory artifact;\\n artifact.libraries = rawArtifact.libraries;\\n artifact.path = rawArtifact.path;\\n artifact.timestamp = rawArtifact.timestamp;\\n artifact.pending = rawArtifact.pending;\\n artifact.txReturns = rawArtifact.txReturns;\\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\\n return artifact;\\n }\\n\\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\\n for (uint256 i; i < rawTxs.length; i++) {\\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\\n }\\n return txs;\\n }\\n\\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\\n Tx1559 memory transaction;\\n transaction.arguments = rawTx.arguments;\\n transaction.contractName = rawTx.contractName;\\n transaction.functionSig = rawTx.functionSig;\\n transaction.hash = rawTx.hash;\\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\\n transaction.opcode = rawTx.opcode;\\n return transaction;\\n }\\n\\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\\n internal\\n pure\\n virtual\\n returns (Tx1559Detail memory)\\n {\\n Tx1559Detail memory txDetail;\\n txDetail.data = rawDetail.data;\\n txDetail.from = rawDetail.from;\\n txDetail.to = rawDetail.to;\\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\\n txDetail.txType = _bytesToUint(rawDetail.txType);\\n txDetail.value = _bytesToUint(rawDetail.value);\\n txDetail.gas = _bytesToUint(rawDetail.gas);\\n txDetail.accessList = rawDetail.accessList;\\n return txDetail;\\n }\\n\\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\\n string memory deployData = vm.readFile(path);\\n bytes memory parsedDeployData = vm.parseJson(deployData, \\\".transactions\\\");\\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\\n return rawToConvertedEIPTx1559s(rawTxs);\\n }\\n\\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\\n string memory deployData = vm.readFile(path);\\n string memory key = string(abi.encodePacked(\\\".transactions[\\\", vm.toString(index), \\\"]\\\"));\\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\\n return rawToConvertedEIPTx1559(rawTx);\\n }\\n\\n // Analogous to readTransactions, but for receipts.\\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\\n string memory deployData = vm.readFile(path);\\n bytes memory parsedDeployData = vm.parseJson(deployData, \\\".receipts\\\");\\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\\n return rawToConvertedReceipts(rawReceipts);\\n }\\n\\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\\n string memory deployData = vm.readFile(path);\\n string memory key = string(abi.encodePacked(\\\".receipts[\\\", vm.toString(index), \\\"]\\\"));\\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\\n return rawToConvertedReceipt(rawReceipt);\\n }\\n\\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\\n for (uint256 i; i < rawReceipts.length; i++) {\\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\\n }\\n return receipts;\\n }\\n\\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\\n Receipt memory receipt;\\n receipt.blockHash = rawReceipt.blockHash;\\n receipt.to = rawReceipt.to;\\n receipt.from = rawReceipt.from;\\n receipt.contractAddress = rawReceipt.contractAddress;\\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\\n receipt.status = _bytesToUint(rawReceipt.status);\\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\\n receipt.logsBloom = rawReceipt.logsBloom;\\n receipt.transactionHash = rawReceipt.transactionHash;\\n return receipt;\\n }\\n\\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\\n internal\\n pure\\n virtual\\n returns (ReceiptLog[] memory)\\n {\\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\\n for (uint256 i; i < rawLogs.length; i++) {\\n logs[i].logAddress = rawLogs[i].logAddress;\\n logs[i].blockHash = rawLogs[i].blockHash;\\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\\n logs[i].data = rawLogs[i].data;\\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\\n logs[i].topics = rawLogs[i].topics;\\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\\n logs[i].removed = rawLogs[i].removed;\\n }\\n return logs;\\n }\\n\\n // Deploy a contract by fetching the contract bytecode from\\n // the artifacts directory\\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\\n /// @solidity memory-safe-assembly\\n assembly {\\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\\n }\\n\\n require(addr != address(0), \\\"StdCheats deployCode(string,bytes): Deployment failed.\\\");\\n }\\n\\n function deployCode(string memory what) internal virtual returns (address addr) {\\n bytes memory bytecode = vm.getCode(what);\\n /// @solidity memory-safe-assembly\\n assembly {\\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\\n }\\n\\n require(addr != address(0), \\\"StdCheats deployCode(string): Deployment failed.\\\");\\n }\\n\\n /// @dev deploy contract with value on construction\\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\\n /// @solidity memory-safe-assembly\\n assembly {\\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\\n }\\n\\n require(addr != address(0), \\\"StdCheats deployCode(string,bytes,uint256): Deployment failed.\\\");\\n }\\n\\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\\n bytes memory bytecode = vm.getCode(what);\\n /// @solidity memory-safe-assembly\\n assembly {\\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\\n }\\n\\n require(addr != address(0), \\\"StdCheats deployCode(string,uint256): Deployment failed.\\\");\\n }\\n\\n // creates a labeled address and the corresponding private key\\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\\n privateKey = uint256(keccak256(abi.encodePacked(name)));\\n addr = vm.addr(privateKey);\\n vm.label(addr, name);\\n }\\n\\n // creates a labeled address\\n function makeAddr(string memory name) internal virtual returns (address addr) {\\n (addr,) = makeAddrAndKey(name);\\n }\\n\\n // Destroys an account immediately, sending the balance to beneficiary.\\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\\n // only after tx ends, this will run immediately.\\n function destroyAccount(address who, address beneficiary) internal virtual {\\n uint256 currBalance = who.balance;\\n vm.etch(who, abi.encode());\\n vm.deal(who, 0);\\n vm.resetNonce(who);\\n\\n uint256 beneficiaryBalance = beneficiary.balance;\\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\\n }\\n\\n // creates a struct containing both a labeled address and the corresponding private key\\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\\n (account.addr, account.key) = makeAddrAndKey(name);\\n }\\n\\n function deriveRememberKey(string memory mnemonic, uint32 index)\\n internal\\n virtual\\n returns (address who, uint256 privateKey)\\n {\\n privateKey = vm.deriveKey(mnemonic, index);\\n who = vm.rememberKey(privateKey);\\n }\\n\\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\\n require(b.length <= 32, \\\"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\\\");\\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\\n }\\n\\n function isFork() internal view virtual returns (bool status) {\\n try vm.activeFork() {\\n status = true;\\n } catch (bytes memory) {}\\n }\\n\\n modifier skipWhenForking() {\\n if (!isFork()) {\\n _;\\n }\\n }\\n\\n modifier skipWhenNotForking() {\\n if (isFork()) {\\n _;\\n }\\n }\\n\\n modifier noGasMetering() {\\n vm.pauseGasMetering();\\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\\n // we check if gasMetering started in the off position. If it did, we don't want to turn\\n // it back on until we exit the top level function that used the modifier\\n //\\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\\n // so we only turn metering back on at the end of the funcA\\n bool gasStartedOff = gasMeteringOff;\\n gasMeteringOff = true;\\n\\n _;\\n\\n // if gas metering was on when this modifier was called, turn it back on at the end\\n if (!gasStartedOff) {\\n gasMeteringOff = false;\\n vm.resumeGasMetering();\\n }\\n }\\n\\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\\n // Checker changed `chainid` from pure to view in 0.8.0.\\n function _viewChainId() private view returns (uint256 chainId) {\\n // Assembly required since `block.chainid` was introduced in 0.8.0.\\n assembly {\\n chainId := chainid()\\n }\\n\\n address(this); // Silence warnings in older Solc versions.\\n }\\n\\n function _pureChainId() private pure returns (uint256 chainId) {\\n function() internal view returns (uint256) fnIn = _viewChainId;\\n function() internal pure returns (uint256) pureChainId;\\n assembly {\\n pureChainId := fnIn\\n }\\n chainId = pureChainId();\\n }\\n}\\n\\n// Wrappers around cheatcodes to avoid footguns\\nabstract contract StdCheats is StdCheatsSafe {\\n using stdStorage for StdStorage;\\n\\n StdStorage private stdstore;\\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\\\"hevm cheat code\\\")))));\\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\\n\\n // Skip forward or rewind time by the specified number of seconds\\n function skip(uint256 time) internal virtual {\\n vm.warp(block.timestamp + time);\\n }\\n\\n function rewind(uint256 time) internal virtual {\\n vm.warp(block.timestamp - time);\\n }\\n\\n // Setup a prank from an address that has some ether\\n function hoax(address msgSender) internal virtual {\\n vm.deal(msgSender, 1 << 128);\\n vm.prank(msgSender);\\n }\\n\\n function hoax(address msgSender, uint256 give) internal virtual {\\n vm.deal(msgSender, give);\\n vm.prank(msgSender);\\n }\\n\\n function hoax(address msgSender, address origin) internal virtual {\\n vm.deal(msgSender, 1 << 128);\\n vm.prank(msgSender, origin);\\n }\\n\\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\\n vm.deal(msgSender, give);\\n vm.prank(msgSender, origin);\\n }\\n\\n // Start perpetual prank from an address that has some ether\\n function startHoax(address msgSender) internal virtual {\\n vm.deal(msgSender, 1 << 128);\\n vm.startPrank(msgSender);\\n }\\n\\n function startHoax(address msgSender, uint256 give) internal virtual {\\n vm.deal(msgSender, give);\\n vm.startPrank(msgSender);\\n }\\n\\n // Start perpetual prank from an address that has some ether\\n // tx.origin is set to the origin parameter\\n function startHoax(address msgSender, address origin) internal virtual {\\n vm.deal(msgSender, 1 << 128);\\n vm.startPrank(msgSender, origin);\\n }\\n\\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\\n vm.deal(msgSender, give);\\n vm.startPrank(msgSender, origin);\\n }\\n\\n function changePrank(address msgSender) internal virtual {\\n console2_log(\\\"changePrank is deprecated. Please use vm.startPrank instead.\\\");\\n vm.stopPrank();\\n vm.startPrank(msgSender);\\n }\\n\\n function changePrank(address msgSender, address txOrigin) internal virtual {\\n vm.stopPrank();\\n vm.startPrank(msgSender, txOrigin);\\n }\\n\\n // The same as Vm's `deal`\\n // Use the alternative signature for ERC20 tokens\\n function deal(address to, uint256 give) internal virtual {\\n vm.deal(to, give);\\n }\\n\\n // Set the balance of an account for any ERC20 token\\n // Use the alternative signature to update `totalSupply`\\n function deal(address token, address to, uint256 give) internal virtual {\\n deal(token, to, give, false);\\n }\\n\\n // Set the balance of an account for any ERC1155 token\\n // Use the alternative signature to update `totalSupply`\\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\\n dealERC1155(token, to, id, give, false);\\n }\\n\\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\\n // get current balance\\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\\n uint256 prevBal = abi.decode(balData, (uint256));\\n\\n // update balance\\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\\n\\n // update total supply\\n if (adjust) {\\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\\n uint256 totSup = abi.decode(totSupData, (uint256));\\n if (give < prevBal) {\\n totSup -= (prevBal - give);\\n } else {\\n totSup += (give - prevBal);\\n }\\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\\n }\\n }\\n\\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\\n // get current balance\\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\\n uint256 prevBal = abi.decode(balData, (uint256));\\n\\n // update balance\\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\\n\\n // update total supply\\n if (adjust) {\\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\\n require(\\n totSupData.length != 0,\\n \\\"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\\\"\\n );\\n uint256 totSup = abi.decode(totSupData, (uint256));\\n if (give < prevBal) {\\n totSup -= (prevBal - give);\\n } else {\\n totSup += (give - prevBal);\\n }\\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\\n }\\n }\\n\\n function dealERC721(address token, address to, uint256 id) internal virtual {\\n // check if token id is already minted and the actual owner.\\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\\n require(successMinted, \\\"StdCheats deal(address,address,uint,bool): id not minted.\\\");\\n\\n // get owner current balance\\n (, bytes memory fromBalData) =\\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\\n\\n // get new user current balance\\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\\n\\n // update balances\\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\\n\\n // update owner\\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\\n }\\n\\n function deployCodeTo(string memory what, address where) internal virtual {\\n deployCodeTo(what, \\\"\\\", 0, where);\\n }\\n\\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\\n deployCodeTo(what, args, 0, where);\\n }\\n\\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\\n bytes memory creationCode = vm.getCode(what);\\n vm.etch(where, abi.encodePacked(creationCode, args));\\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\\\"\\\");\\n require(success, \\\"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\\\");\\n vm.etch(where, runtimeBytecode);\\n }\\n\\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\\n function console2_log(string memory p0) private view {\\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n status;\\n }\\n}\\n\"\n },\n \"forge-std/StdError.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\\npragma solidity >=0.6.2 <0.9.0;\\n\\nlibrary stdError {\\n bytes public constant assertionError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x01);\\n bytes public constant arithmeticError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x11);\\n bytes public constant divisionError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x12);\\n bytes public constant enumConversionError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x21);\\n bytes public constant encodeStorageError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x22);\\n bytes public constant popError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x31);\\n bytes public constant indexOOBError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x32);\\n bytes public constant memOverflowError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x41);\\n bytes public constant zeroVarError = abi.encodeWithSignature(\\\"Panic(uint256)\\\", 0x51);\\n}\\n\"\n },\n \"forge-std/StdInvariant.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\npragma experimental ABIEncoderV2;\\n\\nabstract contract StdInvariant {\\n struct FuzzSelector {\\n address addr;\\n bytes4[] selectors;\\n }\\n\\n struct FuzzInterface {\\n address addr;\\n string[] artifacts;\\n }\\n\\n address[] private _excludedContracts;\\n address[] private _excludedSenders;\\n address[] private _targetedContracts;\\n address[] private _targetedSenders;\\n\\n string[] private _excludedArtifacts;\\n string[] private _targetedArtifacts;\\n\\n FuzzSelector[] private _targetedArtifactSelectors;\\n FuzzSelector[] private _targetedSelectors;\\n\\n FuzzInterface[] private _targetedInterfaces;\\n\\n // Functions for users:\\n // These are intended to be called in tests.\\n\\n function excludeContract(address newExcludedContract_) internal {\\n _excludedContracts.push(newExcludedContract_);\\n }\\n\\n function excludeSender(address newExcludedSender_) internal {\\n _excludedSenders.push(newExcludedSender_);\\n }\\n\\n function excludeArtifact(string memory newExcludedArtifact_) internal {\\n _excludedArtifacts.push(newExcludedArtifact_);\\n }\\n\\n function targetArtifact(string memory newTargetedArtifact_) internal {\\n _targetedArtifacts.push(newTargetedArtifact_);\\n }\\n\\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\\n }\\n\\n function targetContract(address newTargetedContract_) internal {\\n _targetedContracts.push(newTargetedContract_);\\n }\\n\\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\\n _targetedSelectors.push(newTargetedSelector_);\\n }\\n\\n function targetSender(address newTargetedSender_) internal {\\n _targetedSenders.push(newTargetedSender_);\\n }\\n\\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\\n _targetedInterfaces.push(newTargetedInterface_);\\n }\\n\\n // Functions for forge:\\n // These are called by forge to run invariant tests and don't need to be called in tests.\\n\\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\\n excludedArtifacts_ = _excludedArtifacts;\\n }\\n\\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\\n excludedContracts_ = _excludedContracts;\\n }\\n\\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\\n excludedSenders_ = _excludedSenders;\\n }\\n\\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\\n targetedArtifacts_ = _targetedArtifacts;\\n }\\n\\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\\n }\\n\\n function targetContracts() public view returns (address[] memory targetedContracts_) {\\n targetedContracts_ = _targetedContracts;\\n }\\n\\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\\n targetedSelectors_ = _targetedSelectors;\\n }\\n\\n function targetSenders() public view returns (address[] memory targetedSenders_) {\\n targetedSenders_ = _targetedSenders;\\n }\\n\\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\\n targetedInterfaces_ = _targetedInterfaces;\\n }\\n}\\n\"\n },\n \"forge-std/StdJson.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0 <0.9.0;\\n\\npragma experimental ABIEncoderV2;\\n\\nimport {VmSafe} from \\\"./Vm.sol\\\";\\n\\n// Helpers for parsing and writing JSON files\\n// To parse:\\n// ```\\n// using stdJson for string;\\n// string memory json = vm.readFile(\\\"some_peth\\\");\\n// json.parseUint(\\\"\\\");\\n// ```\\n// To write:\\n// ```\\n// using stdJson for string;\\n// string memory json = \\\"deploymentArtifact\\\";\\n// Contract contract = new Contract();\\n// json.serialize(\\\"contractAddress\\\", address(contract));\\n// json = json.serialize(\\\"deploymentTimes\\\", uint(1));\\n// // store the stringified JSON to the 'json' variable we have been using as a key\\n// // as we won't need it any longer\\n// string memory json2 = \\\"finalArtifact\\\";\\n// string memory final = json2.serialize(\\\"depArtifact\\\", json);\\n// final.write(\\\"\\\");\\n// ```\\n\\nlibrary stdJson {\\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\\\"hevm cheat code\\\")))));\\n\\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\\n return vm.parseJson(json, key);\\n }\\n\\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\\n return vm.parseJsonUint(json, key);\\n }\\n\\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\\n return vm.parseJsonUintArray(json, key);\\n }\\n\\n function readInt(string memory json, string memory key) internal pure returns (int256) {\\n return vm.parseJsonInt(json, key);\\n }\\n\\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\\n return vm.parseJsonIntArray(json, key);\\n }\\n\\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\\n return vm.parseJsonBytes32(json, key);\\n }\\n\\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\\n return vm.parseJsonBytes32Array(json, key);\\n }\\n\\n function readString(string memory json, string memory key) internal pure returns (string memory) {\\n return vm.parseJsonString(json, key);\\n }\\n\\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\\n return vm.parseJsonStringArray(json, key);\\n }\\n\\n function readAddress(string memory json, string memory key) internal pure returns (address) {\\n return vm.parseJsonAddress(json, key);\\n }\\n\\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\\n return vm.parseJsonAddressArray(json, key);\\n }\\n\\n function readBool(string memory json, string memory key) internal pure returns (bool) {\\n return vm.parseJsonBool(json, key);\\n }\\n\\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\\n return vm.parseJsonBoolArray(json, key);\\n }\\n\\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\\n return vm.parseJsonBytes(json, key);\\n }\\n\\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\\n return vm.parseJsonBytesArray(json, key);\\n }\\n\\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\\n return vm.serializeJson(jsonKey, rootObject);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\\n return vm.serializeBool(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\\n internal\\n returns (string memory)\\n {\\n return vm.serializeBool(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\\n return vm.serializeUint(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\\n internal\\n returns (string memory)\\n {\\n return vm.serializeUint(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\\n return vm.serializeInt(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\\n internal\\n returns (string memory)\\n {\\n return vm.serializeInt(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\\n return vm.serializeAddress(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, address[] memory value)\\n internal\\n returns (string memory)\\n {\\n return vm.serializeAddress(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\\n return vm.serializeBytes32(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\\n internal\\n returns (string memory)\\n {\\n return vm.serializeBytes32(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\\n return vm.serializeBytes(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\\n internal\\n returns (string memory)\\n {\\n return vm.serializeBytes(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, string memory value)\\n internal\\n returns (string memory)\\n {\\n return vm.serializeString(jsonKey, key, value);\\n }\\n\\n function serialize(string memory jsonKey, string memory key, string[] memory value)\\n internal\\n returns (string memory)\\n {\\n return vm.serializeString(jsonKey, key, value);\\n }\\n\\n function write(string memory jsonKey, string memory path) internal {\\n vm.writeJson(jsonKey, path);\\n }\\n\\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\\n vm.writeJson(jsonKey, path, valueKey);\\n }\\n}\\n\"\n },\n \"forge-std/StdMath.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\nlibrary stdMath {\\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\\n\\n function abs(int256 a) internal pure returns (uint256) {\\n // Required or it will fail when `a = type(int256).min`\\n if (a == INT256_MIN) {\\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\\n }\\n\\n return uint256(a > 0 ? a : -a);\\n }\\n\\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a - b : b - a;\\n }\\n\\n function delta(int256 a, int256 b) internal pure returns (uint256) {\\n // a and b are of the same sign\\n // this works thanks to two's complement, the left-most bit is the sign bit\\n if ((a ^ b) > -1) {\\n return delta(abs(a), abs(b));\\n }\\n\\n // a and b are of opposite signs\\n return abs(a) + abs(b);\\n }\\n\\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 absDelta = delta(a, b);\\n\\n return absDelta * 1e18 / b;\\n }\\n\\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\\n uint256 absDelta = delta(a, b);\\n uint256 absB = abs(b);\\n\\n return absDelta * 1e18 / absB;\\n }\\n}\\n\"\n },\n \"forge-std/StdStorage.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\nimport {Vm} from \\\"./Vm.sol\\\";\\n\\nstruct StdStorage {\\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\\n bytes32[] _keys;\\n bytes4 _sig;\\n uint256 _depth;\\n address _target;\\n bytes32 _set;\\n}\\n\\nlibrary stdStorageSafe {\\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\\n event WARNING_UninitedSlot(address who, uint256 slot);\\n\\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\\\"hevm cheat code\\\")))));\\n\\n function sigs(string memory sigStr) internal pure returns (bytes4) {\\n return bytes4(keccak256(bytes(sigStr)));\\n }\\n\\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\\n // slot complexity:\\n // if flat, will be bytes32(uint256(uint));\\n // if map, will be keccak256(abi.encode(key, uint(slot)));\\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\\n function find(StdStorage storage self) internal returns (uint256) {\\n address who = self._target;\\n bytes4 fsig = self._sig;\\n uint256 field_depth = self._depth;\\n bytes32[] memory ins = self._keys;\\n\\n // calldata to test against\\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\\n }\\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\\n vm.record();\\n bytes32 fdat;\\n {\\n (, bytes memory rdat) = who.staticcall(cald);\\n fdat = bytesToBytes32(rdat, 32 * field_depth);\\n }\\n\\n (bytes32[] memory reads,) = vm.accesses(address(who));\\n if (reads.length == 1) {\\n bytes32 curr = vm.load(who, reads[0]);\\n if (curr == bytes32(0)) {\\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\\n }\\n if (fdat != curr) {\\n require(\\n false,\\n \\\"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\\\"\\n );\\n }\\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\\n } else if (reads.length > 1) {\\n for (uint256 i = 0; i < reads.length; i++) {\\n bytes32 prev = vm.load(who, reads[i]);\\n if (prev == bytes32(0)) {\\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\\n }\\n if (prev != fdat) {\\n continue;\\n }\\n bytes32 new_val = ~prev;\\n // store\\n vm.store(who, reads[i], new_val);\\n bool success;\\n {\\n bytes memory rdat;\\n (success, rdat) = who.staticcall(cald);\\n fdat = bytesToBytes32(rdat, 32 * field_depth);\\n }\\n\\n if (success && fdat == new_val) {\\n // we found which of the slots is the actual one\\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\\n vm.store(who, reads[i], prev);\\n break;\\n }\\n vm.store(who, reads[i], prev);\\n }\\n } else {\\n revert(\\\"stdStorage find(StdStorage): No storage use detected for target.\\\");\\n }\\n\\n require(\\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\\n \\\"stdStorage find(StdStorage): Slot(s) not found.\\\"\\n );\\n\\n delete self._target;\\n delete self._sig;\\n delete self._keys;\\n delete self._depth;\\n\\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\\n }\\n\\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\\n self._target = _target;\\n return self;\\n }\\n\\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\\n self._sig = _sig;\\n return self;\\n }\\n\\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\\n self._sig = sigs(_sig);\\n return self;\\n }\\n\\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\\n self._keys.push(bytes32(uint256(uint160(who))));\\n return self;\\n }\\n\\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\\n self._keys.push(bytes32(amt));\\n return self;\\n }\\n\\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\\n self._keys.push(key);\\n return self;\\n }\\n\\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\\n self._depth = _depth;\\n return self;\\n }\\n\\n function read(StdStorage storage self) private returns (bytes memory) {\\n address t = self._target;\\n uint256 s = find(self);\\n return abi.encode(vm.load(t, bytes32(s)));\\n }\\n\\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\\n return abi.decode(read(self), (bytes32));\\n }\\n\\n function read_bool(StdStorage storage self) internal returns (bool) {\\n int256 v = read_int(self);\\n if (v == 0) return false;\\n if (v == 1) return true;\\n revert(\\\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\\\");\\n }\\n\\n function read_address(StdStorage storage self) internal returns (address) {\\n return abi.decode(read(self), (address));\\n }\\n\\n function read_uint(StdStorage storage self) internal returns (uint256) {\\n return abi.decode(read(self), (uint256));\\n }\\n\\n function read_int(StdStorage storage self) internal returns (int256) {\\n return abi.decode(read(self), (int256));\\n }\\n\\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\\n address who = self._target;\\n uint256 field_depth = self._depth;\\n vm.startMappingRecording();\\n uint256 child = find(self) - field_depth;\\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\\n if (!found) {\\n revert(\\n \\\"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\\\"\\n );\\n }\\n return (uint256(parent_slot), key);\\n }\\n\\n function root(StdStorage storage self) internal returns (uint256) {\\n address who = self._target;\\n uint256 field_depth = self._depth;\\n vm.startMappingRecording();\\n uint256 child = find(self) - field_depth;\\n bool found;\\n bytes32 root_slot;\\n bytes32 parent_slot;\\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\\n if (!found) {\\n revert(\\n \\\"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\\\"\\n );\\n }\\n while (found) {\\n root_slot = parent_slot;\\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\\n }\\n return uint256(root_slot);\\n }\\n\\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\\n bytes32 out;\\n\\n uint256 max = b.length > 32 ? 32 : b.length;\\n for (uint256 i = 0; i < max; i++) {\\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\\n }\\n return out;\\n }\\n\\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\\n bytes memory result = new bytes(b.length * 32);\\n for (uint256 i = 0; i < b.length; i++) {\\n bytes32 k = b[i];\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(add(result, add(32, mul(32, i))), k)\\n }\\n }\\n\\n return result;\\n }\\n}\\n\\nlibrary stdStorage {\\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\\\"hevm cheat code\\\")))));\\n\\n function sigs(string memory sigStr) internal pure returns (bytes4) {\\n return stdStorageSafe.sigs(sigStr);\\n }\\n\\n function find(StdStorage storage self) internal returns (uint256) {\\n return stdStorageSafe.find(self);\\n }\\n\\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\\n return stdStorageSafe.target(self, _target);\\n }\\n\\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\\n return stdStorageSafe.sig(self, _sig);\\n }\\n\\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\\n return stdStorageSafe.sig(self, _sig);\\n }\\n\\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\\n return stdStorageSafe.with_key(self, who);\\n }\\n\\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\\n return stdStorageSafe.with_key(self, amt);\\n }\\n\\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\\n return stdStorageSafe.with_key(self, key);\\n }\\n\\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\\n return stdStorageSafe.depth(self, _depth);\\n }\\n\\n function checked_write(StdStorage storage self, address who) internal {\\n checked_write(self, bytes32(uint256(uint160(who))));\\n }\\n\\n function checked_write(StdStorage storage self, uint256 amt) internal {\\n checked_write(self, bytes32(amt));\\n }\\n\\n function checked_write_int(StdStorage storage self, int256 val) internal {\\n checked_write(self, bytes32(uint256(val)));\\n }\\n\\n function checked_write(StdStorage storage self, bool write) internal {\\n bytes32 t;\\n /// @solidity memory-safe-assembly\\n assembly {\\n t := write\\n }\\n checked_write(self, t);\\n }\\n\\n function checked_write(StdStorage storage self, bytes32 set) internal {\\n address who = self._target;\\n bytes4 fsig = self._sig;\\n uint256 field_depth = self._depth;\\n bytes32[] memory ins = self._keys;\\n\\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\\n find(self);\\n }\\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\\n\\n bytes32 fdat;\\n {\\n (, bytes memory rdat) = who.staticcall(cald);\\n fdat = bytesToBytes32(rdat, 32 * field_depth);\\n }\\n bytes32 curr = vm.load(who, slot);\\n\\n if (fdat != curr) {\\n require(\\n false,\\n \\\"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\\\"\\n );\\n }\\n vm.store(who, slot, set);\\n delete self._target;\\n delete self._sig;\\n delete self._keys;\\n delete self._depth;\\n }\\n\\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\\n return stdStorageSafe.read_bytes32(self);\\n }\\n\\n function read_bool(StdStorage storage self) internal returns (bool) {\\n return stdStorageSafe.read_bool(self);\\n }\\n\\n function read_address(StdStorage storage self) internal returns (address) {\\n return stdStorageSafe.read_address(self);\\n }\\n\\n function read_uint(StdStorage storage self) internal returns (uint256) {\\n return stdStorageSafe.read_uint(self);\\n }\\n\\n function read_int(StdStorage storage self) internal returns (int256) {\\n return stdStorageSafe.read_int(self);\\n }\\n\\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\\n return stdStorageSafe.parent(self);\\n }\\n\\n function root(StdStorage storage self) internal returns (uint256) {\\n return stdStorageSafe.root(self);\\n }\\n\\n // Private function so needs to be copied over\\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\\n bytes32 out;\\n\\n uint256 max = b.length > 32 ? 32 : b.length;\\n for (uint256 i = 0; i < max; i++) {\\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\\n }\\n return out;\\n }\\n\\n // Private function so needs to be copied over\\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\\n bytes memory result = new bytes(b.length * 32);\\n for (uint256 i = 0; i < b.length; i++) {\\n bytes32 k = b[i];\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(add(result, add(32, mul(32, i))), k)\\n }\\n }\\n\\n return result;\\n }\\n}\\n\"\n },\n \"forge-std/StdStyle.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.4.22 <0.9.0;\\n\\nimport {VmSafe} from \\\"./Vm.sol\\\";\\n\\nlibrary StdStyle {\\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\\\"hevm cheat code\\\")))));\\n\\n string constant RED = \\\"\\\\u001b[91m\\\";\\n string constant GREEN = \\\"\\\\u001b[92m\\\";\\n string constant YELLOW = \\\"\\\\u001b[93m\\\";\\n string constant BLUE = \\\"\\\\u001b[94m\\\";\\n string constant MAGENTA = \\\"\\\\u001b[95m\\\";\\n string constant CYAN = \\\"\\\\u001b[96m\\\";\\n string constant BOLD = \\\"\\\\u001b[1m\\\";\\n string constant DIM = \\\"\\\\u001b[2m\\\";\\n string constant ITALIC = \\\"\\\\u001b[3m\\\";\\n string constant UNDERLINE = \\\"\\\\u001b[4m\\\";\\n string constant INVERSE = \\\"\\\\u001b[7m\\\";\\n string constant RESET = \\\"\\\\u001b[0m\\\";\\n\\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\\n return string(abi.encodePacked(style, self, RESET));\\n }\\n\\n function red(string memory self) internal pure returns (string memory) {\\n return styleConcat(RED, self);\\n }\\n\\n function red(uint256 self) internal pure returns (string memory) {\\n return red(vm.toString(self));\\n }\\n\\n function red(int256 self) internal pure returns (string memory) {\\n return red(vm.toString(self));\\n }\\n\\n function red(address self) internal pure returns (string memory) {\\n return red(vm.toString(self));\\n }\\n\\n function red(bool self) internal pure returns (string memory) {\\n return red(vm.toString(self));\\n }\\n\\n function redBytes(bytes memory self) internal pure returns (string memory) {\\n return red(vm.toString(self));\\n }\\n\\n function redBytes32(bytes32 self) internal pure returns (string memory) {\\n return red(vm.toString(self));\\n }\\n\\n function green(string memory self) internal pure returns (string memory) {\\n return styleConcat(GREEN, self);\\n }\\n\\n function green(uint256 self) internal pure returns (string memory) {\\n return green(vm.toString(self));\\n }\\n\\n function green(int256 self) internal pure returns (string memory) {\\n return green(vm.toString(self));\\n }\\n\\n function green(address self) internal pure returns (string memory) {\\n return green(vm.toString(self));\\n }\\n\\n function green(bool self) internal pure returns (string memory) {\\n return green(vm.toString(self));\\n }\\n\\n function greenBytes(bytes memory self) internal pure returns (string memory) {\\n return green(vm.toString(self));\\n }\\n\\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\\n return green(vm.toString(self));\\n }\\n\\n function yellow(string memory self) internal pure returns (string memory) {\\n return styleConcat(YELLOW, self);\\n }\\n\\n function yellow(uint256 self) internal pure returns (string memory) {\\n return yellow(vm.toString(self));\\n }\\n\\n function yellow(int256 self) internal pure returns (string memory) {\\n return yellow(vm.toString(self));\\n }\\n\\n function yellow(address self) internal pure returns (string memory) {\\n return yellow(vm.toString(self));\\n }\\n\\n function yellow(bool self) internal pure returns (string memory) {\\n return yellow(vm.toString(self));\\n }\\n\\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\\n return yellow(vm.toString(self));\\n }\\n\\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\\n return yellow(vm.toString(self));\\n }\\n\\n function blue(string memory self) internal pure returns (string memory) {\\n return styleConcat(BLUE, self);\\n }\\n\\n function blue(uint256 self) internal pure returns (string memory) {\\n return blue(vm.toString(self));\\n }\\n\\n function blue(int256 self) internal pure returns (string memory) {\\n return blue(vm.toString(self));\\n }\\n\\n function blue(address self) internal pure returns (string memory) {\\n return blue(vm.toString(self));\\n }\\n\\n function blue(bool self) internal pure returns (string memory) {\\n return blue(vm.toString(self));\\n }\\n\\n function blueBytes(bytes memory self) internal pure returns (string memory) {\\n return blue(vm.toString(self));\\n }\\n\\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\\n return blue(vm.toString(self));\\n }\\n\\n function magenta(string memory self) internal pure returns (string memory) {\\n return styleConcat(MAGENTA, self);\\n }\\n\\n function magenta(uint256 self) internal pure returns (string memory) {\\n return magenta(vm.toString(self));\\n }\\n\\n function magenta(int256 self) internal pure returns (string memory) {\\n return magenta(vm.toString(self));\\n }\\n\\n function magenta(address self) internal pure returns (string memory) {\\n return magenta(vm.toString(self));\\n }\\n\\n function magenta(bool self) internal pure returns (string memory) {\\n return magenta(vm.toString(self));\\n }\\n\\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\\n return magenta(vm.toString(self));\\n }\\n\\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\\n return magenta(vm.toString(self));\\n }\\n\\n function cyan(string memory self) internal pure returns (string memory) {\\n return styleConcat(CYAN, self);\\n }\\n\\n function cyan(uint256 self) internal pure returns (string memory) {\\n return cyan(vm.toString(self));\\n }\\n\\n function cyan(int256 self) internal pure returns (string memory) {\\n return cyan(vm.toString(self));\\n }\\n\\n function cyan(address self) internal pure returns (string memory) {\\n return cyan(vm.toString(self));\\n }\\n\\n function cyan(bool self) internal pure returns (string memory) {\\n return cyan(vm.toString(self));\\n }\\n\\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\\n return cyan(vm.toString(self));\\n }\\n\\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\\n return cyan(vm.toString(self));\\n }\\n\\n function bold(string memory self) internal pure returns (string memory) {\\n return styleConcat(BOLD, self);\\n }\\n\\n function bold(uint256 self) internal pure returns (string memory) {\\n return bold(vm.toString(self));\\n }\\n\\n function bold(int256 self) internal pure returns (string memory) {\\n return bold(vm.toString(self));\\n }\\n\\n function bold(address self) internal pure returns (string memory) {\\n return bold(vm.toString(self));\\n }\\n\\n function bold(bool self) internal pure returns (string memory) {\\n return bold(vm.toString(self));\\n }\\n\\n function boldBytes(bytes memory self) internal pure returns (string memory) {\\n return bold(vm.toString(self));\\n }\\n\\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\\n return bold(vm.toString(self));\\n }\\n\\n function dim(string memory self) internal pure returns (string memory) {\\n return styleConcat(DIM, self);\\n }\\n\\n function dim(uint256 self) internal pure returns (string memory) {\\n return dim(vm.toString(self));\\n }\\n\\n function dim(int256 self) internal pure returns (string memory) {\\n return dim(vm.toString(self));\\n }\\n\\n function dim(address self) internal pure returns (string memory) {\\n return dim(vm.toString(self));\\n }\\n\\n function dim(bool self) internal pure returns (string memory) {\\n return dim(vm.toString(self));\\n }\\n\\n function dimBytes(bytes memory self) internal pure returns (string memory) {\\n return dim(vm.toString(self));\\n }\\n\\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\\n return dim(vm.toString(self));\\n }\\n\\n function italic(string memory self) internal pure returns (string memory) {\\n return styleConcat(ITALIC, self);\\n }\\n\\n function italic(uint256 self) internal pure returns (string memory) {\\n return italic(vm.toString(self));\\n }\\n\\n function italic(int256 self) internal pure returns (string memory) {\\n return italic(vm.toString(self));\\n }\\n\\n function italic(address self) internal pure returns (string memory) {\\n return italic(vm.toString(self));\\n }\\n\\n function italic(bool self) internal pure returns (string memory) {\\n return italic(vm.toString(self));\\n }\\n\\n function italicBytes(bytes memory self) internal pure returns (string memory) {\\n return italic(vm.toString(self));\\n }\\n\\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\\n return italic(vm.toString(self));\\n }\\n\\n function underline(string memory self) internal pure returns (string memory) {\\n return styleConcat(UNDERLINE, self);\\n }\\n\\n function underline(uint256 self) internal pure returns (string memory) {\\n return underline(vm.toString(self));\\n }\\n\\n function underline(int256 self) internal pure returns (string memory) {\\n return underline(vm.toString(self));\\n }\\n\\n function underline(address self) internal pure returns (string memory) {\\n return underline(vm.toString(self));\\n }\\n\\n function underline(bool self) internal pure returns (string memory) {\\n return underline(vm.toString(self));\\n }\\n\\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\\n return underline(vm.toString(self));\\n }\\n\\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\\n return underline(vm.toString(self));\\n }\\n\\n function inverse(string memory self) internal pure returns (string memory) {\\n return styleConcat(INVERSE, self);\\n }\\n\\n function inverse(uint256 self) internal pure returns (string memory) {\\n return inverse(vm.toString(self));\\n }\\n\\n function inverse(int256 self) internal pure returns (string memory) {\\n return inverse(vm.toString(self));\\n }\\n\\n function inverse(address self) internal pure returns (string memory) {\\n return inverse(vm.toString(self));\\n }\\n\\n function inverse(bool self) internal pure returns (string memory) {\\n return inverse(vm.toString(self));\\n }\\n\\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\\n return inverse(vm.toString(self));\\n }\\n\\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\\n return inverse(vm.toString(self));\\n }\\n}\\n\"\n },\n \"forge-std/StdUtils.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\npragma experimental ABIEncoderV2;\\n\\nimport {IMulticall3} from \\\"./interfaces/IMulticall3.sol\\\";\\nimport {VmSafe} from \\\"./Vm.sol\\\";\\n\\nabstract contract StdUtils {\\n /*//////////////////////////////////////////////////////////////////////////\\n CONSTANTS\\n //////////////////////////////////////////////////////////////////////////*/\\n\\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\\\"hevm cheat code\\\")))));\\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\\n uint256 private constant INT256_MIN_ABS =\\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\\n uint256 private constant SECP256K1_ORDER =\\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\\n uint256 private constant UINT256_MAX =\\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\\n\\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\\n\\n /*//////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////*/\\n\\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\\n require(min <= max, \\\"StdUtils bound(uint256,uint256,uint256): Max is less than min.\\\");\\n // If x is between min and max, return x directly. This is to ensure that dictionary values\\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\\n if (x >= min && x <= max) return x;\\n\\n uint256 size = max - min + 1;\\n\\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\\n // This helps ensure coverage of the min/max values.\\n if (x <= 3 && size > x) return min + x;\\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\\n\\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\\n if (x > max) {\\n uint256 diff = x - max;\\n uint256 rem = diff % size;\\n if (rem == 0) return max;\\n result = min + rem - 1;\\n } else if (x < min) {\\n uint256 diff = min - x;\\n uint256 rem = diff % size;\\n if (rem == 0) return min;\\n result = max - rem + 1;\\n }\\n }\\n\\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\\n result = _bound(x, min, max);\\n console2_log(\\\"Bound Result\\\", result);\\n }\\n\\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\\n require(min <= max, \\\"StdUtils bound(int256,int256,int256): Max is less than min.\\\");\\n\\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\\n // int256 : -(2**255) ~ (2**255 - 1)\\n // uint256: 0 ~ (2**256 - 1)\\n // So, add 2**255, INT256_MIN_ABS to the integer values.\\n //\\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\\n // So, use `~uint256(x) + 1` instead.\\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\\n\\n uint256 y = _bound(_x, _min, _max);\\n\\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\\n }\\n\\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\\n result = _bound(x, min, max);\\n console2_log(\\\"Bound result\\\", vm.toString(result));\\n }\\n\\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\\n }\\n\\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\\n require(b.length <= 32, \\\"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\\\");\\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\\n }\\n\\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\\n // forgefmt: disable-start\\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\\n // A one byte integer uses its own value as its length prefix, there is no additional \\\"0x80 + length\\\" prefix that comes before it.\\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\\n\\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\\n // forgefmt: disable-end\\n\\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\\n return addressFromLast20Bytes(\\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\\n );\\n }\\n\\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\\n internal\\n pure\\n virtual\\n returns (address)\\n {\\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\\n }\\n\\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\\n }\\n\\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\\n return hashInitCode(creationCode, \\\"\\\");\\n }\\n\\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\\n /// @param args the ABI-encoded arguments to the constructor of C\\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(creationCode, args));\\n }\\n\\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\\n function getTokenBalances(address token, address[] memory addresses)\\n internal\\n virtual\\n returns (uint256[] memory balances)\\n {\\n uint256 tokenCodeSize;\\n assembly {\\n tokenCodeSize := extcodesize(token)\\n }\\n require(tokenCodeSize > 0, \\\"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\\\");\\n\\n // ABI encode the aggregate call to Multicall3.\\n uint256 length = addresses.length;\\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\\n for (uint256 i = 0; i < length; ++i) {\\n // 0x70a08231 = bytes4(\\\"balanceOf(address)\\\"))\\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\\n }\\n\\n // Make the aggregate call.\\n (, bytes[] memory returnData) = multicall.aggregate(calls);\\n\\n // ABI decode the return data and return the balances.\\n balances = new uint256[](length);\\n for (uint256 i = 0; i < length; ++i) {\\n balances[i] = abi.decode(returnData[i], (uint256));\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////*/\\n\\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\\n return address(uint160(uint256(bytesValue)));\\n }\\n\\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\\n\\n function console2_log(string memory p0, uint256 p1) private view {\\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\\\"log(string,uint256)\\\", p0, p1));\\n status;\\n }\\n\\n function console2_log(string memory p0, string memory p1) private view {\\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n status;\\n }\\n}\\n\"\n },\n \"forge-std/Test.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\npragma experimental ABIEncoderV2;\\n\\n// 💬 ABOUT\\n// Forge Std's default Test.\\n\\n// 🧩 MODULES\\nimport {console} from \\\"./console.sol\\\";\\nimport {console2} from \\\"./console2.sol\\\";\\nimport {safeconsole} from \\\"./safeconsole.sol\\\";\\nimport {StdAssertions} from \\\"./StdAssertions.sol\\\";\\nimport {StdChains} from \\\"./StdChains.sol\\\";\\nimport {StdCheats} from \\\"./StdCheats.sol\\\";\\nimport {stdError} from \\\"./StdError.sol\\\";\\nimport {StdInvariant} from \\\"./StdInvariant.sol\\\";\\nimport {stdJson} from \\\"./StdJson.sol\\\";\\nimport {stdMath} from \\\"./StdMath.sol\\\";\\nimport {StdStorage, stdStorage} from \\\"./StdStorage.sol\\\";\\nimport {StdStyle} from \\\"./StdStyle.sol\\\";\\nimport {StdUtils} from \\\"./StdUtils.sol\\\";\\nimport {Vm} from \\\"./Vm.sol\\\";\\n\\n// 📦 BOILERPLATE\\nimport {TestBase} from \\\"./Base.sol\\\";\\nimport {DSTest} from \\\"ds-test/test.sol\\\";\\n\\n// ⭐️ TEST\\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\\n// Note: IS_TEST() must return true.\\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\\n}\\n\"\n },\n \"forge-std/Vm.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.2 <0.9.0;\\n\\npragma experimental ABIEncoderV2;\\n\\n// Cheatcodes are marked as view/pure/none using the following rules:\\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\\n// 3. Otherwise you're `pure`.\\n\\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\\n// result in Script simulations differing from on-chain execution. It is recommended to only use\\n// these cheats in scripts.\\ninterface VmSafe {\\n // ======== Types ========\\n enum CallerMode {\\n None,\\n Broadcast,\\n RecurrentBroadcast,\\n Prank,\\n RecurrentPrank\\n }\\n\\n struct Log {\\n bytes32[] topics;\\n bytes data;\\n address emitter;\\n }\\n\\n struct Rpc {\\n string key;\\n string url;\\n }\\n\\n struct EthGetLogs {\\n address emitter;\\n bytes32[] topics;\\n bytes data;\\n bytes32 blockHash;\\n uint64 blockNumber;\\n bytes32 transactionHash;\\n uint64 transactionIndex;\\n uint256 logIndex;\\n bool removed;\\n }\\n\\n struct DirEntry {\\n string errorMessage;\\n string path;\\n uint64 depth;\\n bool isDir;\\n bool isSymlink;\\n }\\n\\n struct FsMetadata {\\n bool isDir;\\n bool isSymlink;\\n uint256 length;\\n bool readOnly;\\n uint256 modified;\\n uint256 accessed;\\n uint256 created;\\n }\\n\\n struct Wallet {\\n address addr;\\n uint256 publicKeyX;\\n uint256 publicKeyY;\\n uint256 privateKey;\\n }\\n\\n struct FfiResult {\\n int32 exitCode;\\n bytes stdout;\\n bytes stderr;\\n }\\n\\n // ======== EVM ========\\n\\n // Gets the address for a given private key\\n function addr(uint256 privateKey) external pure returns (address keyAddr);\\n\\n // Gets the nonce of an account.\\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\\n function getNonce(address account) external view returns (uint64 nonce);\\n\\n // Loads a storage slot from an address\\n function load(address target, bytes32 slot) external view returns (bytes32 data);\\n\\n // Signs data\\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\\n\\n // -------- Record Storage --------\\n // Records all storage reads and writes\\n function record() external;\\n\\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\\n\\n // -------- Recording Map Writes --------\\n\\n // Starts recording all map SSTOREs for later retrieval.\\n function startMappingRecording() external;\\n\\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\\n function stopMappingRecording() external;\\n\\n // Gets the number of elements in the mapping at the given slot, for a given address.\\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\\n\\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\\n\\n // Gets the map key and parent of a mapping at a given slot, for a given address.\\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\\n external\\n returns (bool found, bytes32 key, bytes32 parent);\\n\\n // -------- Record Logs --------\\n // Record all the transaction logs\\n function recordLogs() external;\\n\\n // Gets all the recorded logs\\n function getRecordedLogs() external returns (Log[] memory logs);\\n\\n // -------- Gas Metering --------\\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\\n // using these functions directly.\\n\\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\\n function pauseGasMetering() external;\\n\\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\\n function resumeGasMetering() external;\\n\\n // -------- RPC Methods --------\\n\\n /// Gets all the logs according to specified filter.\\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\\n external\\n returns (EthGetLogs[] memory logs);\\n\\n // Performs an Ethereum JSON-RPC request to the current fork URL.\\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\\n\\n // ======== Test Configuration ========\\n\\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\\n function assume(bool condition) external pure;\\n\\n // Writes a breakpoint to jump to in the debugger\\n function breakpoint(string calldata char) external;\\n\\n // Writes a conditional breakpoint to jump to in the debugger\\n function breakpoint(string calldata char, bool value) external;\\n\\n // Returns the RPC url for the given alias\\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\\n\\n // Returns all rpc urls and their aliases `[alias, url][]`\\n function rpcUrls() external view returns (string[2][] memory urls);\\n\\n // Returns all rpc urls and their aliases as structs.\\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\\n\\n // Suspends execution of the main thread for `duration` milliseconds\\n function sleep(uint256 duration) external;\\n\\n // ======== OS and Filesystem ========\\n\\n // -------- Metadata --------\\n\\n // Returns true if the given path points to an existing entity, else returns false\\n function exists(string calldata path) external returns (bool result);\\n\\n // Given a path, query the file system to get information about a file, directory, etc.\\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\\n\\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\\n function isDir(string calldata path) external returns (bool result);\\n\\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\\n function isFile(string calldata path) external returns (bool result);\\n\\n // Get the path of the current project root.\\n function projectRoot() external view returns (string memory path);\\n\\n // Returns the time since unix epoch in milliseconds\\n function unixTime() external returns (uint256 milliseconds);\\n\\n // -------- Reading and writing --------\\n\\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\\n // `path` is relative to the project root.\\n function closeFile(string calldata path) external;\\n\\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\\n // Both `from` and `to` are relative to the project root.\\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\\n\\n // Creates a new, empty directory at the provided path.\\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\\n // - User lacks permissions to modify `path`.\\n // - A parent of the given path doesn't exist and `recursive` is false.\\n // - `path` already exists and `recursive` is false.\\n // `path` is relative to the project root.\\n function createDir(string calldata path, bool recursive) external;\\n\\n // Reads the directory at the given path recursively, up to `max_depth`.\\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\\n // Follows symbolic links if `follow_links` is true.\\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\\n external\\n view\\n returns (DirEntry[] memory entries);\\n\\n // Reads the entire content of file to string. `path` is relative to the project root.\\n function readFile(string calldata path) external view returns (string memory data);\\n\\n // Reads the entire content of file as binary. `path` is relative to the project root.\\n function readFileBinary(string calldata path) external view returns (bytes memory data);\\n\\n // Reads next line of file to string.\\n function readLine(string calldata path) external view returns (string memory line);\\n\\n // Reads a symbolic link, returning the path that the link points to.\\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\\n // - `path` is not a symbolic link.\\n // - `path` does not exist.\\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\\n\\n // Removes a directory at the provided path.\\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\\n // - `path` doesn't exist.\\n // - `path` isn't a directory.\\n // - User lacks permissions to modify `path`.\\n // - The directory is not empty and `recursive` is false.\\n // `path` is relative to the project root.\\n function removeDir(string calldata path, bool recursive) external;\\n\\n // Removes a file from the filesystem.\\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\\n // - `path` points to a directory.\\n // - The file doesn't exist.\\n // - The user lacks permissions to remove the file.\\n // `path` is relative to the project root.\\n function removeFile(string calldata path) external;\\n\\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\\n // `path` is relative to the project root.\\n function writeFile(string calldata path, string calldata data) external;\\n\\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\\n // `path` is relative to the project root.\\n function writeFileBinary(string calldata path, bytes calldata data) external;\\n\\n // Writes line to file, creating a file if it does not exist.\\n // `path` is relative to the project root.\\n function writeLine(string calldata path, string calldata data) external;\\n\\n // -------- Foreign Function Interface --------\\n\\n // Performs a foreign function call via the terminal\\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\\n\\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\\n\\n // ======== Environment Variables ========\\n\\n // Sets environment variables\\n function setEnv(string calldata name, string calldata value) external;\\n\\n // Reads environment variables, (name) => (value)\\n function envBool(string calldata name) external view returns (bool value);\\n function envUint(string calldata name) external view returns (uint256 value);\\n function envInt(string calldata name) external view returns (int256 value);\\n function envAddress(string calldata name) external view returns (address value);\\n function envBytes32(string calldata name) external view returns (bytes32 value);\\n function envString(string calldata name) external view returns (string memory value);\\n function envBytes(string calldata name) external view returns (bytes memory value);\\n\\n // Reads environment variables as arrays\\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\\n\\n // Read environment variables with default value\\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\\n function envOr(string calldata name, address defaultValue) external returns (address value);\\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\\n\\n // Read environment variables as arrays with default value\\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\\n external\\n returns (bool[] memory value);\\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\\n external\\n returns (uint256[] memory value);\\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\\n external\\n returns (int256[] memory value);\\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\\n external\\n returns (address[] memory value);\\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\\n external\\n returns (bytes32[] memory value);\\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\\n external\\n returns (string[] memory value);\\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\\n external\\n returns (bytes[] memory value);\\n\\n // ======== User Management ========\\n\\n // Derives a private key from the name, labels the account with that name, and returns the wallet\\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\\n\\n // Generates a wallet from the private key and returns the wallet\\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\\n\\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\\n\\n // Gets the label for the specified address\\n function getLabel(address account) external returns (string memory currentLabel);\\n\\n // Get nonce for a Wallet.\\n // See `getNonce(address account)` for an alternative way to get a nonce.\\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\\n\\n // Labels an address in call traces\\n function label(address account, string calldata newLabel) external;\\n\\n // Signs data, (Wallet, digest) => (v, r, s)\\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\\n\\n // ======== Scripts ========\\n\\n // -------- Broadcasting Transactions --------\\n\\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\\n function broadcast() external;\\n\\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\\n function broadcast(address signer) external;\\n\\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\\n function broadcast(uint256 privateKey) external;\\n\\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\\n function startBroadcast() external;\\n\\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\\n function startBroadcast(address signer) external;\\n\\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\\n function startBroadcast(uint256 privateKey) external;\\n\\n // Stops collecting onchain transactions\\n function stopBroadcast() external;\\n\\n // -------- Key Management --------\\n\\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\\n\\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\\n external\\n pure\\n returns (uint256 privateKey);\\n\\n // Adds a private key to the local forge wallet and returns the address\\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\\n\\n // ======== Utilities ========\\n\\n // Convert values to a string\\n function toString(address value) external pure returns (string memory stringifiedValue);\\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\\n function toString(bool value) external pure returns (string memory stringifiedValue);\\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\\n function toString(int256 value) external pure returns (string memory stringifiedValue);\\n\\n // Convert values from a string\\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\\n\\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\\n\\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\\n\\n // ======== JSON Parsing and Manipulation ========\\n\\n // -------- Reading --------\\n\\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\\n // limitations and caveats of the JSON parsing cheats.\\n\\n // Checks if a key exists in a JSON object.\\n function keyExists(string calldata json, string calldata key) external view returns (bool);\\n\\n // Given a string of JSON, return it as ABI-encoded\\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\\n\\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\\n // and hex numbers '0xEF'.\\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\\n // a JSON object.\\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\\n function parseJsonAddressArray(string calldata json, string calldata key)\\n external\\n pure\\n returns (address[] memory);\\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\\n function parseJsonBytes32Array(string calldata json, string calldata key)\\n external\\n pure\\n returns (bytes32[] memory);\\n\\n // Returns array of keys for a JSON object\\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\\n\\n // -------- Writing --------\\n\\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\\n // to use the serialization cheats.\\n\\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\\n // It returns the stringified version of the specific JSON file up to that moment.\\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\\n external\\n returns (string memory json);\\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\\n external\\n returns (string memory json);\\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\\n external\\n returns (string memory json);\\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\\n external\\n returns (string memory json);\\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\\n external\\n returns (string memory json);\\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\\n external\\n returns (string memory json);\\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\\n external\\n returns (string memory json);\\n\\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\\n external\\n returns (string memory json);\\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\\n external\\n returns (string memory json);\\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\\n external\\n returns (string memory json);\\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\\n external\\n returns (string memory json);\\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\\n external\\n returns (string memory json);\\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\\n external\\n returns (string memory json);\\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\\n external\\n returns (string memory json);\\n\\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\\n // to use the JSON writing cheats.\\n\\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\\n function writeJson(string calldata json, string calldata path) external;\\n\\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \\n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\\n}\\n\\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\\n// in tests, but it is not recommended to use these cheats in scripts.\\ninterface Vm is VmSafe {\\n // ======== EVM ========\\n\\n // -------- Block and Transaction Properties --------\\n\\n // Sets block.chainid\\n function chainId(uint256 newChainId) external;\\n\\n // Sets block.coinbase\\n function coinbase(address newCoinbase) external;\\n\\n // Sets block.difficulty\\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\\n // If used on unsupported EVM versions it will revert.\\n function difficulty(uint256 newDifficulty) external;\\n\\n // Sets block.basefee\\n function fee(uint256 newBasefee) external;\\n\\n // Sets block.prevrandao\\n // Not available on EVM versions before Paris. Use `difficulty` instead.\\n // If used on unsupported EVM versions it will revert.\\n function prevrandao(bytes32 newPrevrandao) external;\\n\\n // Sets block.height\\n function roll(uint256 newHeight) external;\\n\\n // Sets tx.gasprice\\n function txGasPrice(uint256 newGasPrice) external;\\n\\n // Sets block.timestamp\\n function warp(uint256 newTimestamp) external;\\n\\n // -------- Account State --------\\n\\n // Sets an address' balance\\n function deal(address account, uint256 newBalance) external;\\n\\n // Sets an address' code\\n function etch(address target, bytes calldata newRuntimeBytecode) external;\\n\\n // Load a genesis JSON file's `allocs` into the in-memory state.\\n function loadAllocs(string calldata pathToAllocsJson) external;\\n\\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\\n function resetNonce(address account) external;\\n\\n // Sets the nonce of an account; must be higher than the current nonce of the account\\n function setNonce(address account, uint64 newNonce) external;\\n\\n // Sets the nonce of an account to an arbitrary value\\n function setNonceUnsafe(address account, uint64 newNonce) external;\\n\\n // Stores a value to an address' storage slot.\\n function store(address target, bytes32 slot, bytes32 value) external;\\n\\n // -------- Call Manipulation --------\\n // --- Mocks ---\\n\\n // Clears all mocked calls\\n function clearMockedCalls() external;\\n\\n // Mocks a call to an address, returning specified data.\\n // Calldata can either be strict or a partial match, e.g. if you only\\n // pass a Solidity selector to the expected calldata, then the entire Solidity\\n // function will be mocked.\\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\\n\\n // Mocks a call to an address with a specific msg.value, returning specified data.\\n // Calldata match takes precedence over msg.value in case of ambiguity.\\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\\n\\n // Reverts a call to an address with specified revert data.\\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\\n\\n // Reverts a call to an address with a specific msg.value, with specified revert data.\\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\\n external;\\n\\n // --- Impersonation (pranks) ---\\n\\n // Sets the *next* call's msg.sender to be the input address\\n function prank(address msgSender) external;\\n\\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\\n function startPrank(address msgSender) external;\\n\\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\\n function prank(address msgSender, address txOrigin) external;\\n\\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\\n function startPrank(address msgSender, address txOrigin) external;\\n\\n // Resets subsequent calls' msg.sender to be `address(this)`\\n function stopPrank() external;\\n\\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\\n\\n // -------- State Snapshots --------\\n\\n // Snapshot the current state of the evm.\\n // Returns the id of the snapshot that was created.\\n // To revert a snapshot use `revertTo`\\n function snapshot() external returns (uint256 snapshotId);\\n\\n // Revert the state of the EVM to a previous snapshot\\n // Takes the snapshot id to revert to.\\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\\n function revertTo(uint256 snapshotId) external returns (bool success);\\n\\n // -------- Forking --------\\n // --- Creation and Selection ---\\n\\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\\n function activeFork() external view returns (uint256 forkId);\\n\\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\\n\\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\\n\\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\\n // and returns the identifier of the fork\\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\\n\\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\\n\\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\\n // the transaction, returns the identifier of the fork\\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\\n\\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\\n\\n // Updates the currently active fork to given block number\\n // This is similar to `roll` but for the currently active fork\\n function rollFork(uint256 blockNumber) external;\\n\\n // Updates the currently active fork to given transaction\\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\\n function rollFork(bytes32 txHash) external;\\n\\n // Updates the given fork to given block number\\n function rollFork(uint256 forkId, uint256 blockNumber) external;\\n\\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\\n function rollFork(uint256 forkId, bytes32 txHash) external;\\n\\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\\n function selectFork(uint256 forkId) external;\\n\\n // Fetches the given transaction from the active fork and executes it on the current state\\n function transact(bytes32 txHash) external;\\n\\n // Fetches the given transaction from the given fork and executes it on the current state\\n function transact(uint256 forkId, bytes32 txHash) external;\\n\\n // --- Behavior ---\\n\\n // In forking mode, explicitly grant the given address cheatcode access\\n function allowCheatcodes(address account) external;\\n\\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\\n // Meaning, changes made to the state of this account will be kept when switching forks\\n function makePersistent(address account) external;\\n function makePersistent(address account0, address account1) external;\\n function makePersistent(address account0, address account1, address account2) external;\\n function makePersistent(address[] calldata accounts) external;\\n\\n // Revokes persistent status from the address, previously added via `makePersistent`\\n function revokePersistent(address account) external;\\n function revokePersistent(address[] calldata accounts) external;\\n\\n // Returns true if the account is marked as persistent\\n function isPersistent(address account) external view returns (bool persistent);\\n\\n // ======== Test Assertions and Utilities ========\\n\\n // Expects a call to an address with the specified calldata.\\n // Calldata can either be a strict or a partial match\\n function expectCall(address callee, bytes calldata data) external;\\n\\n // Expects given number of calls to an address with the specified calldata.\\n function expectCall(address callee, bytes calldata data, uint64 count) external;\\n\\n // Expects a call to an address with the specified msg.value and calldata\\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\\n\\n // Expects given number of calls to an address with the specified msg.value and calldata\\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\\n\\n // Expect a call to an address with the specified msg.value, gas, and calldata.\\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\\n\\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\\n\\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\\n\\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\\n external;\\n\\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\\n\\n // Same as the previous method, but also checks supplied address against emitting contract.\\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\\n external;\\n\\n // Prepare an expected log with all topic and data checks enabled.\\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\\n // logs were emitted in the expected order with the expected topics and data.\\n function expectEmit() external;\\n\\n // Same as the previous method, but also checks supplied address against emitting contract.\\n function expectEmit(address emitter) external;\\n\\n // Expects an error on next call that exactly matches the revert data.\\n function expectRevert(bytes calldata revertData) external;\\n\\n // Expects an error on next call that starts with the revert data.\\n function expectRevert(bytes4 revertData) external;\\n\\n // Expects an error on next call with any revert data.\\n function expectRevert() external;\\n\\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\\n function expectSafeMemory(uint64 min, uint64 max) external;\\n\\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\\n // to the set.\\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\\n\\n // Marks a test as skipped. Must be called at the top of the test.\\n function skip(bool skipTest) external;\\n}\\n\"\n },\n \"solady/src/utils/ECDSA.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n/// @notice Gas optimized ECDSA wrapper.\\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\\n///\\n/// @dev Note:\\n/// - The recovery functions use the ecrecover precompile (0x1).\\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\\n/// This is for more safety by default.\\n/// Use the `tryRecover` variants if you need to get the zero address back\\n/// upon recovery failure instead.\\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\\n/// See: https://eips.ethereum.org/EIPS/eip-2098\\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\\n///\\n/// WARNING! Do NOT use signatures as unique identifiers:\\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\\n/// EIP-712 also enables readable signing of typed data for better user safety.\\n/// This implementation does NOT check if a signature is non-malleable.\\nlibrary ECDSA {\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* CUSTOM ERRORS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev The signature is invalid.\\n error InvalidSignature();\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* RECOVERY OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := 1\\n let m := mload(0x40) // Cache the free memory pointer.\\n for {} 1 {} {\\n mstore(0x00, hash)\\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\\n if eq(mload(signature), 64) {\\n let vs := mload(add(signature, 0x40))\\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\\n break\\n }\\n if eq(mload(signature), 65) {\\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\\n break\\n }\\n result := 0\\n break\\n }\\n result :=\\n mload(\\n staticcall(\\n gas(), // Amount of gas left for the transaction.\\n result, // Address of `ecrecover`.\\n 0x00, // Start of input.\\n 0x80, // Size of input.\\n 0x01, // Start of output.\\n 0x20 // Size of output.\\n )\\n )\\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\\n if iszero(returndatasize()) {\\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x60, 0) // Restore the zero slot.\\n mstore(0x40, m) // Restore the free memory pointer.\\n }\\n }\\n\\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\\n function recoverCalldata(bytes32 hash, bytes calldata signature)\\n internal\\n view\\n returns (address result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := 1\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x00, hash)\\n for {} 1 {} {\\n if eq(signature.length, 64) {\\n let vs := calldataload(add(signature.offset, 0x20))\\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\\n mstore(0x40, calldataload(signature.offset)) // `r`.\\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\\n break\\n }\\n if eq(signature.length, 65) {\\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\\n break\\n }\\n result := 0\\n break\\n }\\n result :=\\n mload(\\n staticcall(\\n gas(), // Amount of gas left for the transaction.\\n result, // Address of `ecrecover`.\\n 0x00, // Start of input.\\n 0x80, // Size of input.\\n 0x01, // Start of output.\\n 0x20 // Size of output.\\n )\\n )\\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\\n if iszero(returndatasize()) {\\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x60, 0) // Restore the zero slot.\\n mstore(0x40, m) // Restore the free memory pointer.\\n }\\n }\\n\\n /// @dev Recovers the signer's address from a message digest `hash`,\\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x00, hash)\\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\\n mstore(0x40, r)\\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\\n result :=\\n mload(\\n staticcall(\\n gas(), // Amount of gas left for the transaction.\\n 1, // Address of `ecrecover`.\\n 0x00, // Start of input.\\n 0x80, // Size of input.\\n 0x01, // Start of output.\\n 0x20 // Size of output.\\n )\\n )\\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\\n if iszero(returndatasize()) {\\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x60, 0) // Restore the zero slot.\\n mstore(0x40, m) // Restore the free memory pointer.\\n }\\n }\\n\\n /// @dev Recovers the signer's address from a message digest `hash`,\\n /// and the signature defined by `v`, `r`, `s`.\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\\n internal\\n view\\n returns (address result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x00, hash)\\n mstore(0x20, and(v, 0xff))\\n mstore(0x40, r)\\n mstore(0x60, s)\\n result :=\\n mload(\\n staticcall(\\n gas(), // Amount of gas left for the transaction.\\n 1, // Address of `ecrecover`.\\n 0x00, // Start of input.\\n 0x80, // Size of input.\\n 0x01, // Start of output.\\n 0x20 // Size of output.\\n )\\n )\\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\\n if iszero(returndatasize()) {\\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x60, 0) // Restore the zero slot.\\n mstore(0x40, m) // Restore the free memory pointer.\\n }\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* TRY-RECOVER OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n // WARNING!\\n // These functions will NOT revert upon recovery failure.\\n // Instead, they will return the zero address upon recovery failure.\\n // It is critical that the returned address is NEVER compared against\\n // a zero address (e.g. an uninitialized address variable).\\n\\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\\n function tryRecover(bytes32 hash, bytes memory signature)\\n internal\\n view\\n returns (address result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := 1\\n let m := mload(0x40) // Cache the free memory pointer.\\n for {} 1 {} {\\n mstore(0x00, hash)\\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\\n if eq(mload(signature), 64) {\\n let vs := mload(add(signature, 0x40))\\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\\n break\\n }\\n if eq(mload(signature), 65) {\\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\\n break\\n }\\n result := 0\\n break\\n }\\n pop(\\n staticcall(\\n gas(), // Amount of gas left for the transaction.\\n result, // Address of `ecrecover`.\\n 0x00, // Start of input.\\n 0x80, // Size of input.\\n 0x40, // Start of output.\\n 0x20 // Size of output.\\n )\\n )\\n mstore(0x60, 0) // Restore the zero slot.\\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\\n result := mload(xor(0x60, returndatasize()))\\n mstore(0x40, m) // Restore the free memory pointer.\\n }\\n }\\n\\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\\n internal\\n view\\n returns (address result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := 1\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x00, hash)\\n for {} 1 {} {\\n if eq(signature.length, 64) {\\n let vs := calldataload(add(signature.offset, 0x20))\\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\\n mstore(0x40, calldataload(signature.offset)) // `r`.\\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\\n break\\n }\\n if eq(signature.length, 65) {\\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\\n break\\n }\\n result := 0\\n break\\n }\\n pop(\\n staticcall(\\n gas(), // Amount of gas left for the transaction.\\n result, // Address of `ecrecover`.\\n 0x00, // Start of input.\\n 0x80, // Size of input.\\n 0x40, // Start of output.\\n 0x20 // Size of output.\\n )\\n )\\n mstore(0x60, 0) // Restore the zero slot.\\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\\n result := mload(xor(0x60, returndatasize()))\\n mstore(0x40, m) // Restore the free memory pointer.\\n }\\n }\\n\\n /// @dev Recovers the signer's address from a message digest `hash`,\\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\\n internal\\n view\\n returns (address result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x00, hash)\\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\\n mstore(0x40, r)\\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\\n pop(\\n staticcall(\\n gas(), // Amount of gas left for the transaction.\\n 1, // Address of `ecrecover`.\\n 0x00, // Start of input.\\n 0x80, // Size of input.\\n 0x40, // Start of output.\\n 0x20 // Size of output.\\n )\\n )\\n mstore(0x60, 0) // Restore the zero slot.\\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\\n result := mload(xor(0x60, returndatasize()))\\n mstore(0x40, m) // Restore the free memory pointer.\\n }\\n }\\n\\n /// @dev Recovers the signer's address from a message digest `hash`,\\n /// and the signature defined by `v`, `r`, `s`.\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\\n internal\\n view\\n returns (address result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x00, hash)\\n mstore(0x20, and(v, 0xff))\\n mstore(0x40, r)\\n mstore(0x60, s)\\n pop(\\n staticcall(\\n gas(), // Amount of gas left for the transaction.\\n 1, // Address of `ecrecover`.\\n 0x00, // Start of input.\\n 0x80, // Size of input.\\n 0x40, // Start of output.\\n 0x20 // Size of output.\\n )\\n )\\n mstore(0x60, 0) // Restore the zero slot.\\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\\n result := mload(xor(0x60, returndatasize()))\\n mstore(0x40, m) // Restore the free memory pointer.\\n }\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* HASHING OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\\n /// This produces a hash corresponding to the one signed with the\\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\\n /// JSON-RPC method as part of EIP-191.\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x20, hash) // Store into scratch space for keccak256.\\n mstore(0x00, \\\"\\\\x00\\\\x00\\\\x00\\\\x00\\\\x19Ethereum Signed Message:\\\\n32\\\") // 28 bytes.\\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\\n }\\n }\\n\\n /// @dev Returns an Ethereum Signed Message, created from `s`.\\n /// This produces a hash corresponding to the one signed with the\\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\\n /// JSON-RPC method as part of EIP-191.\\n /// Note: Supports lengths of `s` up to 999999 bytes.\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let sLength := mload(s)\\n let o := 0x20\\n mstore(o, \\\"\\\\x19Ethereum Signed Message:\\\\n\\\") // 26 bytes, zero-right-padded.\\n mstore(0x00, 0x00)\\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\\n for { let temp := sLength } 1 {} {\\n o := sub(o, 1)\\n mstore8(o, add(48, mod(temp, 10)))\\n temp := div(temp, 10)\\n if iszero(temp) { break }\\n }\\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\\n mstore(s, sLength) // Restore the length.\\n }\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* EMPTY CALLDATA HELPERS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Returns an empty calldata bytes.\\n function emptySignature() internal pure returns (bytes calldata signature) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n signature.length := 0\\n }\\n }\\n}\\n\"\n },\n \"solady/src/utils/EIP712.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\\n///\\n/// @dev Note, this implementation:\\n/// - Uses `address(this)` for the `verifyingContract` field.\\n/// - Does NOT use the optional EIP-712 salt.\\n/// - Does NOT use any EIP-712 extensions.\\n/// This is for simplicity and to save gas.\\n/// If you need to customize, please fork / modify accordingly.\\nabstract contract EIP712 {\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* CONSTANTS AND IMMUTABLES */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev `keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")`.\\n bytes32 internal constant _DOMAIN_TYPEHASH =\\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\\n\\n uint256 private immutable _cachedThis;\\n uint256 private immutable _cachedChainId;\\n bytes32 private immutable _cachedNameHash;\\n bytes32 private immutable _cachedVersionHash;\\n bytes32 private immutable _cachedDomainSeparator;\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* CONSTRUCTOR */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Cache the hashes for cheaper runtime gas costs.\\n /// In the case of upgradeable contracts (i.e. proxies),\\n /// or if the chain id changes due to a hard fork,\\n /// the domain separator will be seamlessly calculated on-the-fly.\\n constructor() {\\n _cachedThis = uint256(uint160(address(this)));\\n _cachedChainId = block.chainid;\\n\\n string memory name;\\n string memory version;\\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\\n bytes32 versionHash =\\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\\n _cachedNameHash = nameHash;\\n _cachedVersionHash = versionHash;\\n\\n bytes32 separator;\\n if (!_domainNameAndVersionMayChange()) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Load the free memory pointer.\\n mstore(m, _DOMAIN_TYPEHASH)\\n mstore(add(m, 0x20), nameHash)\\n mstore(add(m, 0x40), versionHash)\\n mstore(add(m, 0x60), chainid())\\n mstore(add(m, 0x80), address())\\n separator := keccak256(m, 0xa0)\\n }\\n }\\n _cachedDomainSeparator = separator;\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* FUNCTIONS TO OVERRIDE */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Please override this function to return the domain name and version.\\n /// ```\\n /// function _domainNameAndVersion()\\n /// internal\\n /// pure\\n /// virtual\\n /// returns (string memory name, string memory version)\\n /// {\\n /// name = \\\"Solady\\\";\\n /// version = \\\"1\\\";\\n /// }\\n /// ```\\n ///\\n /// Note: If the returned result may change after the contract has been deployed,\\n /// you must override `_domainNameAndVersionMayChange()` to return true.\\n function _domainNameAndVersion()\\n internal\\n view\\n virtual\\n returns (string memory name, string memory version);\\n\\n /// @dev Returns if `_domainNameAndVersion()` may change\\n /// after the contract has been deployed (i.e. after the constructor).\\n /// Default: false.\\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* HASHING OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Returns the EIP-712 domain separator.\\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\\n if (_domainNameAndVersionMayChange()) {\\n separator = _buildDomainSeparator();\\n } else {\\n separator = _cachedDomainSeparator;\\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\\n }\\n }\\n\\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\\n /// given `structHash`, as defined in\\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\\n ///\\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\\n /// ```\\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\\n /// keccak256(\\\"Mail(address to,string contents)\\\"),\\n /// mailTo,\\n /// keccak256(bytes(mailContents))\\n /// )));\\n /// address signer = ECDSA.recover(digest, signature);\\n /// ```\\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\\n // We will use `digest` to store the domain separator to save a bit of gas.\\n if (_domainNameAndVersionMayChange()) {\\n digest = _buildDomainSeparator();\\n } else {\\n digest = _cachedDomainSeparator;\\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\\n }\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Compute the digest.\\n mstore(0x00, 0x1901000000000000) // Store \\\"\\\\x19\\\\x01\\\".\\n mstore(0x1a, digest) // Store the domain separator.\\n mstore(0x3a, structHash) // Store the struct hash.\\n digest := keccak256(0x18, 0x42)\\n // Restore the part of the free memory slot that was overwritten.\\n mstore(0x3a, 0)\\n }\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* EIP-5267 OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\\n function eip712Domain()\\n public\\n view\\n virtual\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n )\\n {\\n fields = hex\\\"0f\\\"; // `0b01111`.\\n (name, version) = _domainNameAndVersion();\\n chainId = block.chainid;\\n verifyingContract = address(this);\\n salt = salt; // `bytes32(0)`.\\n extensions = extensions; // `new uint256[](0)`.\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* PRIVATE HELPERS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Returns the EIP-712 domain separator.\\n function _buildDomainSeparator() private view returns (bytes32 separator) {\\n // We will use `separator` to store the name hash to save a bit of gas.\\n bytes32 versionHash;\\n if (_domainNameAndVersionMayChange()) {\\n (string memory name, string memory version) = _domainNameAndVersion();\\n separator = keccak256(bytes(name));\\n versionHash = keccak256(bytes(version));\\n } else {\\n separator = _cachedNameHash;\\n versionHash = _cachedVersionHash;\\n }\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Load the free memory pointer.\\n mstore(m, _DOMAIN_TYPEHASH)\\n mstore(add(m, 0x20), separator) // Name hash.\\n mstore(add(m, 0x40), versionHash)\\n mstore(add(m, 0x60), chainid())\\n mstore(add(m, 0x80), address())\\n separator := keccak256(m, 0xa0)\\n }\\n }\\n\\n /// @dev Returns if the cached domain separator has been invalidated.\\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\\n uint256 cachedChainId = _cachedChainId;\\n uint256 cachedThis = _cachedThis;\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\\n }\\n }\\n}\\n\"\n },\n \"solady/src/utils/LibClone.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n/// @notice Minimal proxy library.\\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\\n/// @author Minimal proxy by 0age (https://github.com/0age)\\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\\n///\\n/// @dev Minimal proxy:\\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\\n///\\n/// @dev Minimal proxy (PUSH0 variant):\\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \\\"_PUSH0\\\" as\\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\\n/// Please use with caution.\\n///\\n/// @dev Clones with immutable args (CWIA):\\n/// The implementation of CWIA here implements a `receive()` method that emits the\\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\\n/// composability. The minimal proxy implementation does not offer this feature.\\n///\\n/// @dev Minimal ERC1967 proxy:\\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\\n///\\n/// @dev ERC1967I proxy:\\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\\nlibrary LibClone {\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* CONSTANTS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\\n bytes32 internal constant ERC1967_CODE_HASH =\\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\\n\\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\\n bytes32 internal constant ERC1967I_CODE_HASH =\\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* CUSTOM ERRORS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Unable to deploy the clone.\\n error DeploymentFailed();\\n\\n /// @dev The salt must start with either the zero address or `by`.\\n error SaltDoesNotStartWith();\\n\\n /// @dev The ETH transfer has failed.\\n error ETHTransferFailed();\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* MINIMAL PROXY OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Deploys a clone of `implementation`.\\n function clone(address implementation) internal returns (address instance) {\\n instance = clone(0, implementation);\\n }\\n\\n /// @dev Deploys a clone of `implementation`.\\n /// Deposits `value` ETH during deployment.\\n function clone(uint256 value, address implementation) internal returns (address instance) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n /**\\n * --------------------------------------------------------------------------+\\n * CREATION (9 bytes) |\\n * --------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * --------------------------------------------------------------------------|\\n * 60 runSize | PUSH1 runSize | r | |\\n * 3d | RETURNDATASIZE | 0 r | |\\n * 81 | DUP2 | r 0 r | |\\n * 60 offset | PUSH1 offset | o r 0 r | |\\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\\n * f3 | RETURN | | [0..runSize): runtime code |\\n * --------------------------------------------------------------------------|\\n * RUNTIME (44 bytes) |\\n * --------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * --------------------------------------------------------------------------|\\n * |\\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | 0 | |\\n * 3d | RETURNDATASIZE | 0 0 | |\\n * 3d | RETURNDATASIZE | 0 0 0 | |\\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\\n * |\\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\\n * |\\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\\n * |\\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\\n * |\\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\\n * |\\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * fd | REVERT | | [0..rds): returndata |\\n * |\\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\\n * f3 | RETURN | | [0..rds): returndata |\\n * --------------------------------------------------------------------------+\\n */\\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\\n mstore(0x14, implementation)\\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\\n instance := create(value, 0x0c, 0x35)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\\n }\\n }\\n\\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\\n function cloneDeterministic(address implementation, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n instance = cloneDeterministic(0, implementation, salt);\\n }\\n\\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\\n /// Deposits `value` ETH during deployment.\\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\\n mstore(0x14, implementation)\\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\\n instance := create2(value, 0x0c, 0x35, salt)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\\n }\\n }\\n\\n /// @dev Returns the initialization code of the clone of `implementation`.\\n function initCode(address implementation) internal pure returns (bytes memory result) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\\n mstore(add(result, 0x28), implementation)\\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\\n mstore(result, 0x35) // Store the length.\\n mstore(0x40, add(result, 0x60)) // Allocate memory.\\n }\\n }\\n\\n /// @dev Returns the initialization code hash of the clone of `implementation`.\\n /// Used for mining vanity addresses with create2crunch.\\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\\n mstore(0x14, implementation)\\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\\n hash := keccak256(0x0c, 0x35)\\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\\n }\\n }\\n\\n /// @dev Returns the address of the deterministic clone of `implementation`,\\n /// with `salt` by `deployer`.\\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\\n internal\\n pure\\n returns (address predicted)\\n {\\n bytes32 hash = initCodeHash(implementation);\\n predicted = predictDeterministicAddress(hash, salt, deployer);\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Deploys a PUSH0 clone of `implementation`.\\n function clone_PUSH0(address implementation) internal returns (address instance) {\\n instance = clone_PUSH0(0, implementation);\\n }\\n\\n /// @dev Deploys a PUSH0 clone of `implementation`.\\n /// Deposits `value` ETH during deployment.\\n function clone_PUSH0(uint256 value, address implementation)\\n internal\\n returns (address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n /**\\n * --------------------------------------------------------------------------+\\n * CREATION (9 bytes) |\\n * --------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * --------------------------------------------------------------------------|\\n * 60 runSize | PUSH1 runSize | r | |\\n * 5f | PUSH0 | 0 r | |\\n * 81 | DUP2 | r 0 r | |\\n * 60 offset | PUSH1 offset | o r 0 r | |\\n * 5f | PUSH0 | 0 o r 0 r | |\\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\\n * f3 | RETURN | | [0..runSize): runtime code |\\n * --------------------------------------------------------------------------|\\n * RUNTIME (45 bytes) |\\n * --------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * --------------------------------------------------------------------------|\\n * |\\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\\n * 5f | PUSH0 | 0 | |\\n * 5f | PUSH0 | 0 0 | |\\n * |\\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds 0 0 | |\\n * 5f | PUSH0 | 0 cds 0 0 | |\\n * 5f | PUSH0 | 0 0 cds 0 0 | |\\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\\n * |\\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\\n * f4 | DELEGATECALL | success | [0..cds): calldata |\\n * |\\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\\n * |\\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\\n * 57 | JUMPI | | [0..rds): returndata |\\n * |\\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\\n * fd | REVERT | | [0..rds): returndata |\\n * |\\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 5b | JUMPDEST | | [0..rds): returndata |\\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\\n * f3 | RETURN | | [0..rds): returndata |\\n * --------------------------------------------------------------------------+\\n */\\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\\n mstore(0x14, implementation) // 20\\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\\n instance := create(value, 0x0e, 0x36)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\\n }\\n }\\n\\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\\n }\\n\\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\\n /// Deposits `value` ETH during deployment.\\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\\n mstore(0x14, implementation) // 20\\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\\n instance := create2(value, 0x0e, 0x36, salt)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\\n }\\n }\\n\\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\\n mstore(add(result, 0x26), implementation) // 20\\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\\n mstore(result, 0x36) // Store the length.\\n mstore(0x40, add(result, 0x60)) // Allocate memory.\\n }\\n }\\n\\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\\n /// Used for mining vanity addresses with create2crunch.\\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\\n mstore(0x14, implementation) // 20\\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\\n hash := keccak256(0x0e, 0x36)\\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\\n }\\n }\\n\\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\\n /// with `salt` by `deployer`.\\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\\n function predictDeterministicAddress_PUSH0(\\n address implementation,\\n bytes32 salt,\\n address deployer\\n ) internal pure returns (address predicted) {\\n bytes32 hash = initCodeHash_PUSH0(implementation);\\n predicted = predictDeterministicAddress(hash, salt, deployer);\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n // Note: This implementation of CWIA differs from the original implementation.\\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\\n\\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\\n function clone(address implementation, bytes memory data) internal returns (address instance) {\\n instance = clone(0, implementation, data);\\n }\\n\\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\\n /// Deposits `value` ETH during deployment.\\n function clone(uint256 value, address implementation, bytes memory data)\\n internal\\n returns (address instance)\\n {\\n assembly {\\n // Compute the boundaries of the data and cache the memory slots around it.\\n let mBefore3 := mload(sub(data, 0x60))\\n let mBefore2 := mload(sub(data, 0x40))\\n let mBefore1 := mload(sub(data, 0x20))\\n let dataLength := mload(data)\\n let dataEnd := add(add(data, 0x20), dataLength)\\n let mAfter1 := mload(dataEnd)\\n\\n // +2 bytes for telling how much data there is appended to the call.\\n let extraLength := add(dataLength, 2)\\n // The `creationSize` is `extraLength + 108`\\n // The `runSize` is `creationSize - 10`.\\n\\n /**\\n * ---------------------------------------------------------------------------------------------------+\\n * CREATION (10 bytes) |\\n * ---------------------------------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * ---------------------------------------------------------------------------------------------------|\\n * 61 runSize | PUSH2 runSize | r | |\\n * 3d | RETURNDATASIZE | 0 r | |\\n * 81 | DUP2 | r 0 r | |\\n * 60 offset | PUSH1 offset | o r 0 r | |\\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\\n * f3 | RETURN | | [0..runSize): runtime code |\\n * ---------------------------------------------------------------------------------------------------|\\n * RUNTIME (98 bytes + extraLength) |\\n * ---------------------------------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * ---------------------------------------------------------------------------------------------------|\\n * |\\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds | |\\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\\n * 57 | JUMPI | | |\\n * 34 | CALLVALUE | cv | |\\n * 3d | RETURNDATASIZE | 0 cv | |\\n * 52 | MSTORE | | [0..0x20): callvalue |\\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\\n * a1 | LOG1 | | [0..0x20): callvalue |\\n * 00 | STOP | | [0..0x20): callvalue |\\n * 5b | JUMPDEST | | |\\n * |\\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds | |\\n * 3d | RETURNDATASIZE | 0 cds | |\\n * 3d | RETURNDATASIZE | 0 0 cds | |\\n * 37 | CALLDATACOPY | | [0..cds): calldata |\\n * |\\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\\n * |\\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * |\\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * |\\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\\n * |\\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\\n * |\\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * fd | REVERT | | [0..rds): returndata |\\n * |\\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\\n * f3 | RETURN | | [0..rds): returndata |\\n * ---------------------------------------------------------------------------------------------------+\\n */\\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\\n // Write the rest of the bytecode.\\n mstore(\\n sub(data, 0x21),\\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\\n )\\n // `keccak256(\\\"ReceiveETH(uint256)\\\")`\\n mstore(\\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\\n )\\n mstore(\\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\\n // The actual EVM limit may be smaller and may change over time.\\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\\n )\\n mstore(dataEnd, shl(0xf0, extraLength))\\n\\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n\\n // Restore the overwritten memory surrounding `data`.\\n mstore(dataEnd, mAfter1)\\n mstore(data, dataLength)\\n mstore(sub(data, 0x20), mBefore1)\\n mstore(sub(data, 0x40), mBefore2)\\n mstore(sub(data, 0x60), mBefore3)\\n }\\n }\\n\\n /// @dev Deploys a deterministic clone of `implementation`\\n /// with immutable arguments encoded in `data` and `salt`.\\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n instance = cloneDeterministic(0, implementation, data, salt);\\n }\\n\\n /// @dev Deploys a deterministic clone of `implementation`\\n /// with immutable arguments encoded in `data` and `salt`.\\n function cloneDeterministic(\\n uint256 value,\\n address implementation,\\n bytes memory data,\\n bytes32 salt\\n ) internal returns (address instance) {\\n assembly {\\n // Compute the boundaries of the data and cache the memory slots around it.\\n let mBefore3 := mload(sub(data, 0x60))\\n let mBefore2 := mload(sub(data, 0x40))\\n let mBefore1 := mload(sub(data, 0x20))\\n let dataLength := mload(data)\\n let dataEnd := add(add(data, 0x20), dataLength)\\n let mAfter1 := mload(dataEnd)\\n\\n // +2 bytes for telling how much data there is appended to the call.\\n let extraLength := add(dataLength, 2)\\n\\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\\n // Write the rest of the bytecode.\\n mstore(\\n sub(data, 0x21),\\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\\n )\\n // `keccak256(\\\"ReceiveETH(uint256)\\\")`\\n mstore(\\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\\n )\\n mstore(\\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\\n // The actual EVM limit may be smaller and may change over time.\\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\\n )\\n mstore(dataEnd, shl(0xf0, extraLength))\\n\\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n\\n // Restore the overwritten memory surrounding `data`.\\n mstore(dataEnd, mAfter1)\\n mstore(data, dataLength)\\n mstore(sub(data, 0x20), mBefore1)\\n mstore(sub(data, 0x40), mBefore2)\\n mstore(sub(data, 0x60), mBefore3)\\n }\\n }\\n\\n /// @dev Returns the initialization code hash of the clone of `implementation`\\n /// using immutable arguments encoded in `data`.\\n function initCode(address implementation, bytes memory data)\\n internal\\n pure\\n returns (bytes memory result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n let dataLength := mload(data)\\n\\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\\n // The actual EVM limit may be smaller and may change over time.\\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\\n\\n let o := add(result, 0x8c)\\n let end := add(o, dataLength)\\n\\n // Copy the `data` into `result`.\\n for { let d := sub(add(data, 0x20), o) } 1 {} {\\n mstore(o, mload(add(o, d)))\\n o := add(o, 0x20)\\n if iszero(lt(o, end)) { break }\\n }\\n\\n // +2 bytes for telling how much data there is appended to the call.\\n let extraLength := add(dataLength, 2)\\n\\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\\n // Write the rest of the bytecode.\\n mstore(\\n add(result, 0x4b),\\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\\n )\\n // `keccak256(\\\"ReceiveETH(uint256)\\\")`\\n mstore(\\n add(result, 0x32),\\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\\n )\\n mstore(\\n add(result, 0x12),\\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\\n )\\n mstore(end, shl(0xf0, extraLength))\\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\\n mstore(result, add(extraLength, 0x6c)) // Store the length.\\n mstore(0x40, add(0x22, end)) // Allocate memory.\\n }\\n }\\n\\n /// @dev Returns the initialization code hash of the clone of `implementation`\\n /// using immutable arguments encoded in `data`.\\n /// Used for mining vanity addresses with create2crunch.\\n function initCodeHash(address implementation, bytes memory data)\\n internal\\n pure\\n returns (bytes32 hash)\\n {\\n assembly {\\n // Compute the boundaries of the data and cache the memory slots around it.\\n let mBefore3 := mload(sub(data, 0x60))\\n let mBefore2 := mload(sub(data, 0x40))\\n let mBefore1 := mload(sub(data, 0x20))\\n let dataLength := mload(data)\\n let dataEnd := add(add(data, 0x20), dataLength)\\n let mAfter1 := mload(dataEnd)\\n\\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\\n // The actual EVM limit may be smaller and may change over time.\\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\\n\\n // +2 bytes for telling how much data there is appended to the call.\\n let extraLength := add(dataLength, 2)\\n\\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\\n // Write the rest of the bytecode.\\n mstore(\\n sub(data, 0x21),\\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\\n )\\n // `keccak256(\\\"ReceiveETH(uint256)\\\")`\\n mstore(\\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\\n )\\n mstore(\\n sub(data, 0x5a),\\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\\n )\\n mstore(dataEnd, shl(0xf0, extraLength))\\n\\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\\n\\n // Restore the overwritten memory surrounding `data`.\\n mstore(dataEnd, mAfter1)\\n mstore(data, dataLength)\\n mstore(sub(data, 0x20), mBefore1)\\n mstore(sub(data, 0x40), mBefore2)\\n mstore(sub(data, 0x60), mBefore3)\\n }\\n }\\n\\n /// @dev Returns the address of the deterministic clone of\\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\\n function predictDeterministicAddress(\\n address implementation,\\n bytes memory data,\\n bytes32 salt,\\n address deployer\\n ) internal pure returns (address predicted) {\\n bytes32 hash = initCodeHash(implementation, data);\\n predicted = predictDeterministicAddress(hash, salt, deployer);\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* MINIMAL ERC1967 PROXY OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\\n\\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\\n function deployERC1967(address implementation) internal returns (address instance) {\\n instance = deployERC1967(0, implementation);\\n }\\n\\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\\n /// Deposits `value` ETH during deployment.\\n function deployERC1967(uint256 value, address implementation)\\n internal\\n returns (address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n /**\\n * ---------------------------------------------------------------------------------+\\n * CREATION (34 bytes) |\\n * ---------------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * ---------------------------------------------------------------------------------|\\n * 60 runSize | PUSH1 runSize | r | |\\n * 3d | RETURNDATASIZE | 0 r | |\\n * 81 | DUP2 | r 0 r | |\\n * 60 offset | PUSH1 offset | o r 0 r | |\\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\\n * f3 | RETURN | | [0..runSize): runtime code |\\n * ---------------------------------------------------------------------------------|\\n * RUNTIME (61 bytes) |\\n * ---------------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * ---------------------------------------------------------------------------------|\\n * |\\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds | |\\n * 3d | RETURNDATASIZE | 0 cds | |\\n * 3d | RETURNDATASIZE | 0 0 cds | |\\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\\n * |\\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | 0 | |\\n * 3d | RETURNDATASIZE | 0 0 | |\\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\\n * |\\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\\n * |\\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\\n * 57 | JUMPI | | [0..returndatasize): returndata |\\n * |\\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\\n * fd | REVERT | | [0..returndatasize): returndata |\\n * |\\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\\n * f3 | RETURN | | [0..returndatasize): returndata |\\n * ---------------------------------------------------------------------------------+\\n */\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\\n mstore(0x20, 0x6009)\\n mstore(0x1e, implementation)\\n mstore(0x0a, 0x603d3d8160223d3973)\\n instance := create(value, 0x21, 0x5f)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x40, m) // Restore the free memory pointer.\\n mstore(0x60, 0) // Restore the zero slot.\\n }\\n }\\n\\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\\n function deployDeterministicERC1967(address implementation, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n instance = deployDeterministicERC1967(0, implementation, salt);\\n }\\n\\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\\n /// Deposits `value` ETH during deployment.\\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\\n mstore(0x20, 0x6009)\\n mstore(0x1e, implementation)\\n mstore(0x0a, 0x603d3d8160223d3973)\\n instance := create2(value, 0x21, 0x5f, salt)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x40, m) // Restore the free memory pointer.\\n mstore(0x60, 0) // Restore the zero slot.\\n }\\n }\\n\\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\\n /// Note: This method is intended for use in ERC4337 factories,\\n /// which are expected to NOT revert if the proxy is already deployed.\\n function createDeterministicERC1967(address implementation, bytes32 salt)\\n internal\\n returns (bool alreadyDeployed, address instance)\\n {\\n return createDeterministicERC1967(0, implementation, salt);\\n }\\n\\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\\n /// Deposits `value` ETH during deployment.\\n /// Note: This method is intended for use in ERC4337 factories,\\n /// which are expected to NOT revert if the proxy is already deployed.\\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\\n internal\\n returns (bool alreadyDeployed, address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\\n mstore(0x20, 0x6009)\\n mstore(0x1e, implementation)\\n mstore(0x0a, 0x603d3d8160223d3973)\\n // Compute and store the bytecode hash.\\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\\n mstore(m, shl(88, address()))\\n mstore8(m, 0xff) // Write the prefix.\\n mstore(add(m, 0x15), salt)\\n instance := keccak256(m, 0x55)\\n for {} 1 {} {\\n if iszero(extcodesize(instance)) {\\n instance := create2(value, 0x21, 0x5f, salt)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n break\\n }\\n alreadyDeployed := 1\\n if iszero(value) { break }\\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\\n revert(0x1c, 0x04)\\n }\\n break\\n }\\n mstore(0x40, m) // Restore the free memory pointer.\\n mstore(0x60, 0) // Restore the zero slot.\\n }\\n }\\n\\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n mstore(\\n add(result, 0x60),\\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\\n )\\n mstore(\\n add(result, 0x40),\\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\\n )\\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\\n mstore(result, 0x5f) // Store the length.\\n mstore(0x40, add(result, 0x80)) // Allocate memory.\\n }\\n }\\n\\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\\n /// Used for mining vanity addresses with create2crunch.\\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\\n mstore(0x20, 0x6009)\\n mstore(0x1e, implementation)\\n mstore(0x0a, 0x603d3d8160223d3973)\\n hash := keccak256(0x21, 0x5f)\\n mstore(0x40, m) // Restore the free memory pointer.\\n mstore(0x60, 0) // Restore the zero slot.\\n }\\n }\\n\\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\\n /// with `salt` by `deployer`.\\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\\n function predictDeterministicAddressERC1967(\\n address implementation,\\n bytes32 salt,\\n address deployer\\n ) internal pure returns (address predicted) {\\n bytes32 hash = initCodeHashERC1967(implementation);\\n predicted = predictDeterministicAddress(hash, salt, deployer);\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* ERC1967I PROXY OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\\n // This code path skips the delegatecall and directly returns the `implementation` address.\\n // The returned implementation is guaranteed to be valid if the keccak256 of the\\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\\n\\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\\n function deployERC1967I(address implementation) internal returns (address instance) {\\n instance = deployERC1967I(0, implementation);\\n }\\n\\n /// @dev Deploys a ERC1967I proxy with `implementation`.\\n /// Deposits `value` ETH during deployment.\\n function deployERC1967I(uint256 value, address implementation)\\n internal\\n returns (address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n /**\\n * ---------------------------------------------------------------------------------+\\n * CREATION (34 bytes) |\\n * ---------------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * ---------------------------------------------------------------------------------|\\n * 60 runSize | PUSH1 runSize | r | |\\n * 3d | RETURNDATASIZE | 0 r | |\\n * 81 | DUP2 | r 0 r | |\\n * 60 offset | PUSH1 offset | o r 0 r | |\\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\\n * f3 | RETURN | | [0..runSize): runtime code |\\n * ---------------------------------------------------------------------------------|\\n * RUNTIME (82 bytes) |\\n * ---------------------------------------------------------------------------------|\\n * Opcode | Mnemonic | Stack | Memory |\\n * ---------------------------------------------------------------------------------|\\n * |\\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds | |\\n * 58 | PC | 1 cds | |\\n * 14 | EQ | eqs | |\\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\\n * 57 | JUMPI | | |\\n * |\\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 36 | CALLDATASIZE | cds | |\\n * 3d | RETURNDATASIZE | 0 cds | |\\n * 3d | RETURNDATASIZE | 0 0 cds | |\\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\\n * |\\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | 0 | |\\n * 3d | RETURNDATASIZE | 0 0 | |\\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\\n * |\\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\\n * |\\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\\n * 57 | JUMPI | | [0..returndatasize): returndata |\\n * |\\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\\n * fd | REVERT | | [0..returndatasize): returndata |\\n * |\\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\\n * f3 | RETURN | | [0..returndatasize): returndata |\\n * |\\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\\n * 5b | JUMPDEST | | |\\n * 60 0x20 | PUSH1 0x20 | 32 | |\\n * 60 0x0F | PUSH1 0x0F | o 32 | |\\n * 3d | RETURNDATASIZE | 0 o 32 | |\\n * 39 | CODECOPY | | [0..32): implementation slot |\\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\\n * 51 | MLOAD | slot | [0..32): implementation slot |\\n * 54 | SLOAD | impl | [0..32): implementation slot |\\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\\n * 52 | MSTORE | | [0..32): implementation address |\\n * 59 | MSIZE | 32 | [0..32): implementation address |\\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\\n * f3 | RETURN | | [0..32): implementation address |\\n * |\\n * ---------------------------------------------------------------------------------+\\n */\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\\n instance := create(value, 0x0c, 0x74)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x40, m) // Restore the free memory pointer.\\n mstore(0x60, 0) // Restore the zero slot.\\n }\\n }\\n\\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n instance = deployDeterministicERC1967I(0, implementation, salt);\\n }\\n\\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\\n /// Deposits `value` ETH during deployment.\\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\\n internal\\n returns (address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\\n instance := create2(value, 0x0c, 0x74, salt)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n mstore(0x40, m) // Restore the free memory pointer.\\n mstore(0x60, 0) // Restore the zero slot.\\n }\\n }\\n\\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\\n /// Note: This method is intended for use in ERC4337 factories,\\n /// which are expected to NOT revert if the proxy is already deployed.\\n function createDeterministicERC1967I(address implementation, bytes32 salt)\\n internal\\n returns (bool alreadyDeployed, address instance)\\n {\\n return createDeterministicERC1967I(0, implementation, salt);\\n }\\n\\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\\n /// Deposits `value` ETH during deployment.\\n /// Note: This method is intended for use in ERC4337 factories,\\n /// which are expected to NOT revert if the proxy is already deployed.\\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\\n internal\\n returns (bool alreadyDeployed, address instance)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\\n // Compute and store the bytecode hash.\\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\\n mstore(m, shl(88, address()))\\n mstore8(m, 0xff) // Write the prefix.\\n mstore(add(m, 0x15), salt)\\n instance := keccak256(m, 0x55)\\n for {} 1 {} {\\n if iszero(extcodesize(instance)) {\\n instance := create2(value, 0x0c, 0x74, salt)\\n if iszero(instance) {\\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\\n revert(0x1c, 0x04)\\n }\\n break\\n }\\n alreadyDeployed := 1\\n if iszero(value) { break }\\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\\n revert(0x1c, 0x04)\\n }\\n break\\n }\\n mstore(0x40, m) // Restore the free memory pointer.\\n mstore(0x60, 0) // Restore the zero slot.\\n }\\n }\\n\\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n mstore(\\n add(result, 0x74),\\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\\n )\\n mstore(\\n add(result, 0x54),\\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\\n )\\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\\n mstore(add(result, 0x1d), implementation)\\n mstore(add(result, 0x09), 0x60523d8160223d3973)\\n mstore(add(result, 0x94), 0)\\n mstore(result, 0x74) // Store the length.\\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\\n }\\n }\\n\\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\\n /// Used for mining vanity addresses with create2crunch.\\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let m := mload(0x40) // Cache the free memory pointer.\\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\\n hash := keccak256(0x0c, 0x74)\\n mstore(0x40, m) // Restore the free memory pointer.\\n mstore(0x60, 0) // Restore the zero slot.\\n }\\n }\\n\\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\\n /// with `salt` by `deployer`.\\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\\n function predictDeterministicAddressERC1967I(\\n address implementation,\\n bytes32 salt,\\n address deployer\\n ) internal pure returns (address predicted) {\\n bytes32 hash = initCodeHashERC1967I(implementation);\\n predicted = predictDeterministicAddress(hash, salt, deployer);\\n }\\n\\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\\n /* OTHER OPERATIONS */\\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\\n\\n /// @dev Returns the address when a contract with initialization code hash,\\n /// `hash`, is deployed with `salt`, by `deployer`.\\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\\n internal\\n pure\\n returns (address predicted)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Compute and store the bytecode hash.\\n mstore8(0x00, 0xff) // Write the prefix.\\n mstore(0x35, hash)\\n mstore(0x01, shl(96, deployer))\\n mstore(0x15, salt)\\n predicted := keccak256(0x00, 0x55)\\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\\n }\\n }\\n\\n /// @dev Requires that `salt` starts with either the zero address or `by`.\\n function checkStartsWith(bytes32 salt, address by) internal pure {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // If the salt does not start with the zero address or `by`.\\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\\n revert(0x1c, 0x04)\\n }\\n }\\n }\\n}\\n\"\n },\n \"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\": {\n \"content\": \"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/access/AccessController.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport {IAccessController} from \\\"../interfaces/IAccessController.sol\\\";\\nimport {ErrorsLib} from \\\"../libraries/ErrorsLib.sol\\\";\\n\\ncontract AccessController is IAccessController {\\n /// State Variables\\n uint128 constant MULTIPLY_FACTOR = 1000;\\n uint16 constant SIXTY_PERCENT = 600;\\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\\n uint256 public ownerCount;\\n uint256 public guardianCount;\\n uint256 public proposalId;\\n uint256 public proposalTimelock;\\n\\n /// Mappings\\n mapping(address => bool) private _owners;\\n mapping(address => bool) private _guardians;\\n mapping(uint256 => NewOwnerProposal) private _proposals;\\n\\n /// Modifiers\\n modifier onlyOwnerOrSelf() {\\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\\n revert ErrorsLib.OnlyOwnerOrSelf();\\n }\\n _;\\n }\\n\\n modifier onlyGuardian() {\\n if (!isGuardian(msg.sender)) {\\n revert ErrorsLib.OnlyGuardian();\\n }\\n _;\\n }\\n\\n modifier onlyOwnerOrGuardianOrSelf() {\\n if (\\n !(isOwner(msg.sender) ||\\n isGuardian(msg.sender) ||\\n msg.sender == address(this))\\n ) {\\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\\n }\\n _;\\n }\\n\\n /// External\\n /**\\n * @notice Add owner to the wallet.\\n * @dev Only owner or wallet.\\n * @param _newOwner address of new owner to add.\\n */\\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\\n if (\\n _newOwner == address(0) ||\\n isGuardian(_newOwner) ||\\n isOwner(_newOwner)\\n ) {\\n revert ErrorsLib.AddingInvalidOwner();\\n }\\n _addOwner(_newOwner);\\n emit OwnerAdded(address(this), _newOwner);\\n }\\n\\n /**\\n * @notice Remove owner from wallet.\\n * @dev Only owner or wallet.\\n * @param _owner address of wallet owner to remove .\\n */\\n function removeOwner(address _owner) external onlyOwnerOrSelf {\\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\\n if (ownerCount <= 1) {\\n revert ErrorsLib.WalletNeedsOwner();\\n }\\n _removeOwner(_owner);\\n emit OwnerRemoved(address(this), _owner);\\n }\\n\\n /**\\n * @notice Add guardian for the wallet.\\n * @dev Only owner or wallet.\\n * @param _newGuardian address of new guardian to add to wallet.\\n */\\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\\n if (\\n _newGuardian == address(0) ||\\n isGuardian(_newGuardian) ||\\n isOwner(_newGuardian)\\n ) {\\n revert ErrorsLib.AddingInvalidGuardian();\\n }\\n _addGuardian(_newGuardian);\\n emit GuardianAdded(address(this), _newGuardian);\\n }\\n\\n /**\\n * @notice Remove guardian from the wallet.\\n * @dev Only owner or wallet.\\n * @param _guardian address of existing guardian to remove.\\n */\\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\\n _removeGuardian(_guardian);\\n emit GuardianRemoved(address(this), _guardian);\\n }\\n\\n /**\\n * @notice Change the timelock on proposals.\\n * The minimum time (secs) that a proposal is allowed to be discarded.\\n * @dev Only owner or wallet.\\n * @param _newTimelock new timelock in seconds.\\n */\\n function changeProposalTimelock(\\n uint256 _newTimelock\\n ) external onlyOwnerOrSelf {\\n assembly {\\n sstore(proposalTimelock.slot, _newTimelock)\\n }\\n }\\n\\n /**\\n * @notice Discards the current proposal.\\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\\n */\\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\\n NewOwnerProposal storage prop = _proposals[proposalId];\\n uint256 timelock = proposalTimelock == 0\\n ? INITIAL_PROPOSAL_TIMELOCK\\n : proposalTimelock;\\n if (_resolvedProposal()) {\\n revert ErrorsLib.ProposalResolved();\\n }\\n bool allowed = isGuardian(msg.sender);\\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\\n revert ErrorsLib.ProposalTimelocked();\\n\\n prop.resolved = true;\\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\\n }\\n\\n /**\\n * @notice Creates a new owner proposal (adds new owner to wallet).\\n * @dev Only guardian.\\n * @param _newOwner the proposed new owner for the wallet.\\n */\\n function guardianPropose(address _newOwner) external onlyGuardian {\\n if (\\n _newOwner == address(0) ||\\n isGuardian(_newOwner) ||\\n isOwner(_newOwner)\\n ) {\\n revert ErrorsLib.AddingInvalidOwner();\\n }\\n if (guardianCount < 3) {\\n revert ErrorsLib.NotEnoughGuardians();\\n }\\n NewOwnerProposal storage prop = _proposals[proposalId];\\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\\n revert ErrorsLib.ProposalUnresolved();\\n }\\n uint256 newProposalId = proposalId + 1;\\n _proposals[newProposalId].newOwnerProposed = _newOwner;\\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\\n _proposals[newProposalId].approvalCount++;\\n _proposals[newProposalId].resolved = false;\\n _proposals[newProposalId].proposedAt = block.timestamp;\\n proposalId = newProposalId;\\n emit ProposalSubmitted(\\n address(this),\\n newProposalId,\\n _newOwner,\\n msg.sender\\n );\\n }\\n\\n /**\\n * @notice Cosigns a new owner proposal.\\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\\n */\\n function guardianCosign() external onlyGuardian {\\n uint256 latestId = proposalId;\\n NewOwnerProposal storage latestProp = _proposals[latestId];\\n if (latestId == 0) {\\n revert ErrorsLib.InvalidProposal();\\n }\\n if (_checkIfSigned(latestId)) {\\n revert ErrorsLib.AlreadySignedProposal();\\n }\\n if (_resolvedProposal()) {\\n revert ErrorsLib.ProposalResolved();\\n }\\n _proposals[latestId].guardiansApproved.push(msg.sender);\\n _proposals[latestId].approvalCount++;\\n address newOwner = latestProp.newOwnerProposed;\\n if (_checkQuorumReached(latestId)) {\\n _proposals[latestId].resolved = true;\\n _addOwner(newOwner);\\n } else {\\n emit QuorumNotReached(\\n address(this),\\n latestId,\\n newOwner,\\n _proposals[latestId].approvalCount\\n );\\n }\\n }\\n\\n /// Views\\n /**\\n * @notice Checks if _address is owner of wallet.\\n * @param _address address to check if owner of wallet.\\n * @return bool.\\n */\\n function isOwner(address _address) public view returns (bool) {\\n return _owners[_address];\\n }\\n\\n /**\\n * @notice Checks if _address is guardian of wallet.\\n * @param _address address to check if guardian of wallet.\\n * @return bool.\\n */\\n function isGuardian(address _address) public view returns (bool) {\\n return _guardians[_address];\\n }\\n\\n /**\\n * @notice Returns new owner proposal data.\\n * @param _proposalId proposal id to return data for.\\n * @return ownerProposed_ the new owner proposed.\\n * @return approvalCount_ number of guardians that have approved the proposal.\\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\\n * @return resolved_ bool is the proposal resolved.\\n * @return proposedAt_ timestamp of when proposal was initiated.\\n */\\n function getProposal(\\n uint256 _proposalId\\n )\\n public\\n view\\n returns (\\n address ownerProposed_,\\n uint256 approvalCount_,\\n address[] memory guardiansApproved_,\\n bool resolved_,\\n uint256 proposedAt_\\n )\\n {\\n if (_proposalId == 0 || _proposalId > proposalId) {\\n revert ErrorsLib.InvalidProposal();\\n }\\n NewOwnerProposal memory proposal = _proposals[_proposalId];\\n return (\\n proposal.newOwnerProposed,\\n proposal.approvalCount,\\n proposal.guardiansApproved,\\n proposal.resolved,\\n proposal.proposedAt\\n );\\n }\\n\\n /// Internal\\n function _addOwner(address _newOwner) internal {\\n _owners[_newOwner] = true;\\n ownerCount++;\\n }\\n\\n function _addGuardian(address _newGuardian) internal {\\n _guardians[_newGuardian] = true;\\n guardianCount++;\\n if (!_resolvedProposal()) discardCurrentProposal();\\n }\\n\\n function _removeOwner(address _owner) internal {\\n _owners[_owner] = false;\\n ownerCount--;\\n }\\n\\n function _removeGuardian(address _guardian) internal {\\n _guardians[_guardian] = false;\\n guardianCount--;\\n if (!_resolvedProposal()) discardCurrentProposal();\\n }\\n\\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\\n for (\\n uint256 i;\\n i < _proposals[_proposalId].guardiansApproved.length;\\n i++\\n ) {\\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n function _checkQuorumReached(\\n uint256 _proposalId\\n ) internal view returns (bool) {\\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\\n guardianCount >=\\n SIXTY_PERCENT);\\n }\\n\\n function _resolvedProposal() internal view returns (bool) {\\n NewOwnerProposal storage prop = _proposals[proposalId];\\n return prop.resolved;\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\n/**\\n * @title reference implementation of the minimal modular smart account with Hook Extension\\n * @author zeroknots.eth | rhinestone.wtf\\n */\\ncontract AccountBase {\\n error AccountAccessUnauthorized();\\n /////////////////////////////////////////////////////\\n // Access Control\\n ////////////////////////////////////////////////////\\n\\n modifier onlyEntryPointOrSelf() virtual {\\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\\n revert AccountAccessUnauthorized();\\n }\\n _;\\n }\\n\\n modifier onlyEntryPoint() virtual {\\n if (msg.sender != entryPoint()) {\\n revert AccountAccessUnauthorized();\\n }\\n _;\\n }\\n\\n function entryPoint() public view virtual returns (address) {\\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\\n }\\n\\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\\n /// Subclass MAY override this modifier for better funds management.\\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\\n /// it will not be required to send again)\\n ///\\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\\n modifier payPrefund(uint256 missingAccountFunds) virtual {\\n _;\\n /// @solidity memory-safe-assembly\\n assembly {\\n if missingAccountFunds {\\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\\n pop(\\n call(\\n gas(),\\n caller(),\\n missingAccountFunds,\\n codesize(),\\n 0x00,\\n codesize(),\\n 0x00\\n )\\n )\\n }\\n }\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Execution } from \\\"../interfaces/IERC7579Account.sol\\\";\\n\\n/**\\n * @title Execution\\n * @dev This contract executes calls in the context of this contract.\\n * @author zeroknots.eth | rhinestone.wtf\\n * shoutout to solady (vectorized, ross) for this code\\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\\n */\\ncontract ExecutionHelper {\\n error ExecutionFailed();\\n\\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\\n\\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\\n uint256 length = executions.length;\\n result = new bytes[](length);\\n\\n for (uint256 i; i < length; i++) {\\n Execution calldata _exec = executions[i];\\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\\n }\\n }\\n\\n function _tryExecute(Execution[] calldata executions)\\n internal\\n returns (bytes[] memory result)\\n {\\n uint256 length = executions.length;\\n result = new bytes[](length);\\n\\n for (uint256 i; i < length; i++) {\\n Execution calldata _exec = executions[i];\\n bool success;\\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\\n }\\n }\\n\\n function _execute(\\n address target,\\n uint256 value,\\n bytes calldata callData\\n )\\n internal\\n virtual\\n returns (bytes memory result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n calldatacopy(result, callData.offset, callData.length)\\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\\n // Bubble up the revert if the call reverts.\\n returndatacopy(result, 0x00, returndatasize())\\n revert(result, returndatasize())\\n }\\n mstore(result, returndatasize()) // Store the length.\\n let o := add(result, 0x20)\\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\\n }\\n }\\n\\n function _tryExecute(\\n address target,\\n uint256 value,\\n bytes calldata callData\\n )\\n internal\\n virtual\\n returns (bool success, bytes memory result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n calldatacopy(result, callData.offset, callData.length)\\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\\n mstore(result, returndatasize()) // Store the length.\\n let o := add(result, 0x20)\\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\\n }\\n }\\n\\n /// @dev Execute a delegatecall with `delegate` on this account.\\n function _executeDelegatecall(\\n address delegate,\\n bytes calldata callData\\n )\\n internal\\n returns (bytes memory result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n calldatacopy(result, callData.offset, callData.length)\\n // Forwards the `data` to `delegate` via delegatecall.\\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\\n // Bubble up the revert if the call reverts.\\n returndatacopy(result, 0x00, returndatasize())\\n revert(result, returndatasize())\\n }\\n mstore(result, returndatasize()) // Store the length.\\n let o := add(result, 0x20)\\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\\n }\\n }\\n\\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\\n function _tryExecuteDelegatecall(\\n address delegate,\\n bytes calldata callData\\n )\\n internal\\n returns (bool success, bytes memory result)\\n {\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := mload(0x40)\\n calldatacopy(result, callData.offset, callData.length)\\n // Forwards the `data` to `delegate` via delegatecall.\\n success :=\\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\\n mstore(result, returndatasize()) // Store the length.\\n let o := add(result, 0x20)\\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\\n }\\n }\\n}\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport \\\"./ModuleManager.sol\\\";\\nimport \\\"../interfaces/IERC7579Account.sol\\\";\\nimport \\\"../interfaces/IERC7579Module.sol\\\";\\n/**\\n * @title reference implementation of HookManager\\n * @author zeroknots.eth | rhinestone.wtf\\n */\\n\\nabstract contract HookManager {\\n /// @custom:storage-location erc7201:hookmanager.storage.msa\\n struct HookManagerStorage {\\n IHook _hook;\\n }\\n\\n // keccak256(\\\"hookmanager.storage.msa\\\");\\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\\n\\n error HookPostCheckFailed();\\n error HookAlreadyInstalled(address currentHook);\\n\\n modifier withHook() {\\n address hook = _getHook();\\n if (hook == address(0)) {\\n _;\\n } else {\\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\\n _;\\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\\n }\\n }\\n\\n function _setHook(address hook) internal virtual {\\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\\n assembly {\\n sstore(slot, hook)\\n }\\n }\\n\\n function _installHook(address hook, bytes calldata data) internal virtual {\\n address currentHook = _getHook();\\n if (currentHook != address(0)) {\\n revert HookAlreadyInstalled(currentHook);\\n }\\n _setHook(hook);\\n IHook(hook).onInstall(data);\\n }\\n\\n function _uninstallHook(\\n address hook,\\n bytes calldata data\\n ) internal virtual {\\n _setHook(address(0));\\n IHook(hook).onUninstall(data);\\n }\\n\\n function _getHook() internal view returns (address _hook) {\\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\\n assembly {\\n _hook := sload(slot)\\n }\\n }\\n\\n function _isHookInstalled(address module) internal view returns (bool) {\\n return _getHook() == module;\\n }\\n\\n function getActiveHook() external view returns (address hook) {\\n return _getHook();\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport {SentinelListLib, SENTINEL} from \\\"../libs/SentinelList.sol\\\";\\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \\\"../libs/ModeLib.sol\\\";\\nimport {AccountBase} from \\\"./AccountBase.sol\\\";\\nimport \\\"../interfaces/IERC7579Module.sol\\\";\\nimport \\\"forge-std/interfaces/IERC165.sol\\\";\\nimport \\\"./Receiver.sol\\\";\\nimport {ArrayLib} from \\\"../../libraries/ArrayLib.sol\\\";\\n\\n/**\\n * @title ModuleManager\\n * @author zeroknots.eth | rhinestone.wtf\\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\\n * @dev it uses SentinelList to manage the linked list of modules\\n * NOTE: the linked list is just an example. accounts may implement this differently\\n */\\nabstract contract ModuleManager is AccountBase, Receiver {\\n using SentinelListLib for SentinelListLib.SentinelList;\\n\\n error InvalidModule(address module);\\n error NoFallbackHandler(bytes4 selector);\\n error CannotRemoveLastValidator();\\n error FallbackInvalidCallType();\\n error InvalidFallbackCaller(address caller);\\n\\n // keccak256(\\\"modulemanager.storage.msa\\\");\\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\\n\\n struct FallbackHandler {\\n address handler;\\n CallType calltype;\\n address[] allowedCallers;\\n }\\n\\n /// @custom:storage-location erc7201:modulemanager.storage.msa\\n struct ModuleManagerStorage {\\n // linked list of validators. List is initialized by initializeAccount()\\n SentinelListLib.SentinelList $validators;\\n // linked list of executors. List is initialized by initializeAccount()\\n SentinelListLib.SentinelList $executors;\\n // single fallback handler for all fallbacks\\n // account vendors may implement this differently. This is just a reference implementation\\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\\n }\\n\\n function $moduleManager()\\n internal\\n pure\\n virtual\\n returns (ModuleManagerStorage storage $ims)\\n {\\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\\n assembly {\\n $ims.slot := position\\n }\\n }\\n\\n modifier onlyExecutorModule() {\\n SentinelListLib.SentinelList storage $executors = $moduleManager()\\n .$executors;\\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\\n _;\\n }\\n\\n modifier onlyValidatorModule(address validator) {\\n SentinelListLib.SentinelList storage $validators = $moduleManager()\\n .$validators;\\n if (!$validators.contains(validator)) revert InvalidModule(validator);\\n _;\\n }\\n\\n function _initModuleManager() internal virtual {\\n ModuleManagerStorage storage $ims = $moduleManager();\\n $ims.$executors.init();\\n $ims.$validators.init();\\n }\\n\\n function isAlreadyInitialized() internal view virtual returns (bool) {\\n ModuleManagerStorage storage $ims = $moduleManager();\\n return $ims.$validators.alreadyInitialized();\\n }\\n\\n /////////////////////////////////////////////////////\\n // Manage Validators\\n ////////////////////////////////////////////////////\\n function _installValidator(\\n address validator,\\n bytes calldata data\\n ) internal virtual {\\n SentinelListLib.SentinelList storage $validators = $moduleManager()\\n .$validators;\\n $validators.push(validator);\\n IValidator(validator).onInstall(data);\\n }\\n\\n function _uninstallValidator(\\n address validator,\\n bytes calldata data\\n ) internal {\\n // TODO: check if its the last validator. this might brick the account\\n SentinelListLib.SentinelList storage $validators = $moduleManager()\\n .$validators;\\n (address prev, bytes memory disableModuleData) = abi.decode(\\n data,\\n (address, bytes)\\n );\\n $validators.pop(prev, validator);\\n IValidator(validator).onUninstall(disableModuleData);\\n }\\n\\n function _isValidatorInstalled(\\n address validator\\n ) internal view virtual returns (bool) {\\n SentinelListLib.SentinelList storage $validators = $moduleManager()\\n .$validators;\\n return $validators.contains(validator);\\n }\\n\\n /**\\n * THIS IS NOT PART OF THE STANDARD\\n * Helper Function to access linked list\\n */\\n function getValidatorPaginated(\\n address cursor,\\n uint256 size\\n ) external view virtual returns (address[] memory array, address next) {\\n SentinelListLib.SentinelList storage $validators = $moduleManager()\\n .$validators;\\n return $validators.getEntriesPaginated(cursor, size);\\n }\\n\\n /////////////////////////////////////////////////////\\n // Manage Executors\\n ////////////////////////////////////////////////////\\n\\n function _installExecutor(address executor, bytes calldata data) internal {\\n SentinelListLib.SentinelList storage $executors = $moduleManager()\\n .$executors;\\n $executors.push(executor);\\n IExecutor(executor).onInstall(data);\\n }\\n\\n function _uninstallExecutor(\\n address executor,\\n bytes calldata data\\n ) internal {\\n SentinelListLib.SentinelList storage $executors = $moduleManager()\\n .$executors;\\n (address prev, bytes memory disableModuleData) = abi.decode(\\n data,\\n (address, bytes)\\n );\\n $executors.pop(prev, executor);\\n IExecutor(executor).onUninstall(disableModuleData);\\n }\\n\\n function _isExecutorInstalled(\\n address executor\\n ) internal view virtual returns (bool) {\\n SentinelListLib.SentinelList storage $executors = $moduleManager()\\n .$executors;\\n return $executors.contains(executor);\\n }\\n\\n /**\\n * THIS IS NOT PART OF THE STANDARD\\n * Helper Function to access linked list\\n */\\n function getExecutorsPaginated(\\n address cursor,\\n uint256 size\\n ) external view virtual returns (address[] memory array, address next) {\\n SentinelListLib.SentinelList storage $executors = $moduleManager()\\n .$executors;\\n return $executors.getEntriesPaginated(cursor, size);\\n }\\n\\n /////////////////////////////////////////////////////\\n // Manage Fallback\\n ////////////////////////////////////////////////////\\n\\n function _installFallbackHandler(\\n address handler,\\n bytes calldata params\\n ) internal virtual {\\n bytes memory _params = params;\\n bytes4 selector;\\n CallType calltype;\\n address[] memory allowedCallers;\\n bytes memory initData;\\n assembly {\\n let configPtr := add(params.offset, 0x20)\\n let configLen := calldataload(params.offset)\\n\\n selector := calldataload(params.offset)\\n calltype := calldataload(configPtr)\\n\\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\\n\\n allowedCallers := mload(0x40)\\n mstore(\\n 0x40,\\n add(\\n allowedCallers,\\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\\n )\\n )\\n\\n for {\\n let i := 0\\n } lt(i, allowedCallersLen) {\\n i := add(i, 1)\\n } {\\n mstore(\\n add(allowedCallers, mul(i, 0x20)),\\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\\n )\\n }\\n\\n let initDataPos := calldataload(add(configPtr, 0x40))\\n let initDataLen := calldataload(\\n sub(add(configPtr, initDataPos), 0x20)\\n )\\n let initDataPtr := 0x60\\n mstore(initDataPtr, initDataLen)\\n calldatacopy(\\n add(initDataPtr, 0x20),\\n add(configPtr, initDataPos),\\n initDataLen\\n )\\n initData := initDataPtr\\n }\\n\\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\\n\\n if (_isFallbackHandlerInstalled(selector)) {\\n revert(\\\"Function selector already used\\\");\\n }\\n $moduleManager().$fallbacks[selector] = FallbackHandler(\\n handler,\\n calltype,\\n allowedCallers\\n );\\n IFallback(handler).onInstall(initData);\\n }\\n\\n function _uninstallFallbackHandler(\\n address handler,\\n bytes calldata deInitData\\n ) internal virtual {\\n bytes4 selector = bytes4(deInitData[0:4]);\\n bytes memory _deInitData = deInitData[4:];\\n\\n if (!_isFallbackHandlerInstalled(selector)) {\\n revert(\\\"Function selector not used\\\");\\n }\\n\\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\\n selector\\n ];\\n\\n if (activeFallback.handler != handler) {\\n revert(\\\"Function selector not used by this handler\\\");\\n }\\n\\n CallType callType = activeFallback.calltype;\\n\\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\\n address[] memory allowedCallers = new address[](0);\\n $moduleManager().$fallbacks[selector] = FallbackHandler(\\n address(0),\\n CallType.wrap(0x00),\\n allowedCallers\\n );\\n\\n IFallback(handler).onUninstall(_deInitData);\\n }\\n\\n function _isFallbackHandlerInstalled(\\n bytes4 functionSig\\n ) internal view virtual returns (bool) {\\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\\n functionSig\\n ];\\n return $fallback.handler != address(0);\\n }\\n\\n function _isFallbackHandlerInstalled(\\n bytes4 functionSig,\\n address _handler\\n ) internal view virtual returns (bool) {\\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\\n functionSig\\n ];\\n return $fallback.handler == _handler;\\n }\\n\\n function getActiveFallbackHandler(\\n bytes4 functionSig\\n ) external view virtual returns (FallbackHandler memory) {\\n return $moduleManager().$fallbacks[functionSig];\\n }\\n\\n // validates that the caller is allowed and reverts if not.\\n\\n function _validateCaller(bytes4 sig) private view {\\n address[] memory allowed = $moduleManager()\\n .$fallbacks[sig]\\n .allowedCallers;\\n if (ArrayLib._contains(allowed, msg.sender) == false) {\\n revert InvalidFallbackCaller(msg.sender);\\n }\\n }\\n\\n // FALLBACK\\n // calling _validateCaller()\\n\\n fallback() external payable override(Receiver) {\\n _validateCaller(msg.sig);\\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\\n msg.sig\\n ];\\n address handler = $fallbackHandler.handler;\\n CallType calltype = $fallbackHandler.calltype;\\n\\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\\n\\n if (calltype == CALLTYPE_STATIC) {\\n assembly {\\n function allocate(length) -> pos {\\n pos := mload(0x40)\\n mstore(0x40, add(pos, length))\\n }\\n\\n let calldataPtr := allocate(calldatasize())\\n calldatacopy(calldataPtr, 0, calldatasize())\\n\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n let senderPtr := allocate(20)\\n mstore(senderPtr, shl(96, caller()))\\n\\n // Add 20 bytes for the address appended add the end\\n let success := staticcall(\\n gas(),\\n handler,\\n calldataPtr,\\n add(calldatasize(), 20),\\n 0,\\n 0\\n )\\n\\n let returnDataPtr := allocate(returndatasize())\\n returndatacopy(returnDataPtr, 0, returndatasize())\\n if iszero(success) {\\n revert(returnDataPtr, returndatasize())\\n }\\n return(returnDataPtr, returndatasize())\\n }\\n }\\n if (calltype == CALLTYPE_SINGLE) {\\n assembly {\\n function allocate(length) -> pos {\\n pos := mload(0x40)\\n mstore(0x40, add(pos, length))\\n }\\n\\n let calldataPtr := allocate(calldatasize())\\n calldatacopy(calldataPtr, 0, calldatasize())\\n\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n let senderPtr := allocate(20)\\n mstore(senderPtr, shl(96, caller()))\\n\\n // Add 20 bytes for the address appended add the end\\n let success := call(\\n gas(),\\n handler,\\n 0,\\n calldataPtr,\\n add(calldatasize(), 20),\\n 0,\\n 0\\n )\\n\\n let returnDataPtr := allocate(returndatasize())\\n returndatacopy(returnDataPtr, 0, returndatasize())\\n if iszero(success) {\\n revert(returnDataPtr, returndatasize())\\n }\\n return(returnDataPtr, returndatasize())\\n }\\n }\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\n/**\\n * @title Receiver\\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\\n * @author Modified from Solady\\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\\n */\\nabstract contract Receiver {\\n /// @dev For receiving ETH.\\n receive() external payable virtual {}\\n\\n /// @dev Fallback function with the `receiverFallback` modifier.\\n fallback() external payable virtual {}\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport { CallType, ExecType, ModeCode } from \\\"../libs/ModeLib.sol\\\";\\nimport {PackedUserOperation} from \\\"../../../../account-abstraction/contracts/interfaces/IAccount.sol\\\";\\n\\nstruct Execution {\\n address target;\\n uint256 value;\\n bytes callData;\\n}\\n\\ninterface IERC7579Account {\\n event ModuleInstalled(uint256 moduleTypeId, address module);\\n event ModuleUninstalled(uint256 moduleTypeId, address module);\\n\\n /**\\n * @dev Executes a transaction on behalf of the account.\\n * This function is intended to be called by ERC-4337 EntryPoint.sol\\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\\n *\\n * @dev MSA MUST implement this function signature.\\n * If a mode is requested that is not supported by the Account, it MUST revert\\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\\n * @param executionCalldata The encoded execution call data\\n */\\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\\n\\n /**\\n * @dev Executes a transaction on behalf of the account.\\n * This function is intended to be called by Executor Modules\\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\\n *\\n * @dev MSA MUST implement this function signature.\\n * If a mode is requested that is not supported by the Account, it MUST revert\\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\\n * @param executionCalldata The encoded execution call data\\n */\\n function executeFromExecutor(\\n ModeCode mode,\\n bytes calldata executionCalldata\\n )\\n external\\n payable\\n returns (bytes[] memory returnData);\\n\\n /**\\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\\n * This function is intended to be called by ERC-4337 EntryPoint.sol\\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\\n * The implementation of the function is OPTIONAL\\n *\\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\\n */\\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\\n\\n /**\\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\\n * This function is intended to be called by ERC-4337 EntryPoint.sol\\n * this validation function should decode / sload the validator module to validate the userOp\\n * and call it.\\n *\\n * @dev MSA MUST implement this function signature.\\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\\n */\\n function validateUserOp(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n uint256 missingAccountFunds\\n )\\n external\\n payable\\n returns (uint256 validSignature);\\n\\n /**\\n * @dev ERC-1271 isValidSignature\\n * This function is intended to be used to validate a smart account signature\\n * and may forward the call to a validator module\\n *\\n * @param hash The hash of the data that is signed\\n * @param data The data that is signed\\n */\\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\\n\\n /**\\n * @dev installs a Module of a certain type on the smart account\\n * @dev Implement Authorization control of your chosing\\n * @param moduleTypeId the module type ID according the ERC-7579 spec\\n * @param module the module address\\n * @param initData arbitrary data that may be required on the module during `onInstall`\\n * initialization.\\n */\\n function installModule(\\n uint256 moduleTypeId,\\n address module,\\n bytes calldata initData\\n )\\n external\\n payable;\\n\\n /**\\n * @dev uninstalls a Module of a certain type on the smart account\\n * @dev Implement Authorization control of your chosing\\n * @param moduleTypeId the module type ID according the ERC-7579 spec\\n * @param module the module address\\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\\n * de-initialization.\\n */\\n function uninstallModule(\\n uint256 moduleTypeId,\\n address module,\\n bytes calldata deInitData\\n )\\n external\\n payable;\\n\\n /**\\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\\n * @param encodedMode the encoded mode\\n */\\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\\n\\n /**\\n * Function to check if the account supports installation of a certain module type Id\\n * @param moduleTypeId the module type ID according the ERC-7579 spec\\n */\\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\\n\\n /**\\n * Function to check if the account has a certain module installed\\n * @param moduleTypeId the module type ID according the ERC-7579 spec\\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\\n * thus may be necessary to query multiple module types\\n * @param module the module address\\n * @param additionalContext additional context data that the smart account may interpret to\\n * identifiy conditions under which the module is installed.\\n * usually this is not necessary, but for some special hooks that\\n * are stored in mappings, this param might be needed\\n */\\n function isModuleInstalled(\\n uint256 moduleTypeId,\\n address module,\\n bytes calldata additionalContext\\n )\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @dev Returns the account id of the smart account\\n * @return accountImplementationId the account id of the smart account\\n * the accountId should be structured like so:\\n * \\\"vendorname.accountname.semver\\\"\\n */\\n function accountId() external view returns (string memory accountImplementationId);\\n}\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport {PackedUserOperation} from \\\"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\\\";\\n\\nuint256 constant VALIDATION_SUCCESS = 0;\\nuint256 constant VALIDATION_FAILED = 1;\\n\\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\\nuint256 constant MODULE_TYPE_FALLBACK = 3;\\nuint256 constant MODULE_TYPE_HOOK = 4;\\n\\ninterface IModule {\\n error AlreadyInitialized(address smartAccount);\\n error NotInitialized(address smartAccount);\\n\\n /**\\n * @dev This function is called by the smart account during installation of the module\\n * @param data arbitrary data that may be required on the module during `onInstall`\\n * initialization\\n *\\n * MUST revert on error (i.e. if module is already enabled)\\n */\\n function onInstall(bytes calldata data) external;\\n\\n /**\\n * @dev This function is called by the smart account during uninstallation of the module\\n * @param data arbitrary data that may be required on the module during `onUninstall`\\n * de-initialization\\n *\\n * MUST revert on error\\n */\\n function onUninstall(bytes calldata data) external;\\n\\n /**\\n * @dev Returns boolean value if module is a certain type\\n * @param moduleTypeId the module type ID according the ERC-7579 spec\\n *\\n * MUST return true if the module is of the given type and false otherwise\\n */\\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\\n\\n /**\\n * @dev Returns if the module was already initialized for a provided smartaccount\\n */\\n function isInitialized(address smartAccount) external view returns (bool);\\n}\\n\\ninterface IValidator is IModule {\\n error InvalidTargetAddress(address target);\\n\\n /**\\n * @dev Validates a transaction on behalf of the account.\\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\\n * The MSA MUST clean up the userOp before sending it to the validator.\\n * @param userOpHash The hash of the user operation to be validated\\n * @return return value according to ERC-4337\\n */\\n function validateUserOp(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash\\n )\\n external\\n returns (uint256);\\n\\n /**\\n * Validator can be used for ERC-1271 validation\\n */\\n function isValidSignatureWithSender(\\n address sender,\\n bytes32 hash,\\n bytes calldata data\\n )\\n external\\n view\\n returns (bytes4);\\n}\\n\\ninterface IExecutor is IModule { }\\n\\ninterface IHook is IModule {\\n function preCheck(\\n address msgSender,\\n bytes calldata msgData\\n )\\n external\\n returns (bytes memory hookData);\\n function postCheck(bytes calldata hookData) external returns (bool success);\\n}\\n\\ninterface IFallback is IModule { }\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport {IERC7579Account} from \\\"./IERC7579Account.sol\\\";\\n\\nimport {CallType, ExecType, ModeCode} from \\\"../libs/ModeLib.sol\\\";\\n\\ninterface IMSA is IERC7579Account {\\n // Error thrown when an unsupported ModuleType is requested\\n error UnsupportedModuleType(uint256 moduleType);\\n // Error thrown when an execution with an unsupported CallType was made\\n error UnsupportedCallType(CallType callType);\\n // Error thrown when an execution with an unsupported ExecType was made\\n error UnsupportedExecType(ExecType execType);\\n // Error thrown when account initialization fails\\n error AccountInitializationFailed();\\n\\n /**\\n * @dev Initializes the account. Function might be called directly, or by a Factory\\n * @param data. encoded data that can be used during the initialization phase\\n */\\n function initializeAccount(bytes calldata data) external payable;\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport {Execution} from \\\"../interfaces/IERC7579Account.sol\\\";\\n\\n/**\\n * Helper Library for decoding Execution calldata\\n * malloc for memory allocation is bad for gas. use this assembly instead\\n */\\nlibrary ExecutionLib {\\n function decodeBatch(\\n bytes calldata callData\\n ) internal pure returns (Execution[] calldata executionBatch) {\\n /*\\n * Batch Call Calldata Layout\\n * Offset (in bytes) | Length (in bytes) | Contents\\n * 0x0 | 0x4 | bytes4 function selector\\n * 0x4 | - |\\n abi.encode(IERC7579Execution.Execution[])\\n */\\n // solhint-disable-next-line no-inline-assembly\\n assembly (\\\"memory-safe\\\") {\\n let dataPointer := add(\\n callData.offset,\\n calldataload(callData.offset)\\n )\\n\\n // Extract the ERC7579 Executions\\n executionBatch.offset := add(dataPointer, 32)\\n executionBatch.length := calldataload(dataPointer)\\n }\\n }\\n\\n function encodeBatch(\\n Execution[] memory executions\\n ) internal pure returns (bytes memory callData) {\\n callData = abi.encode(executions);\\n }\\n\\n function decodeSingle(\\n bytes calldata executionCalldata\\n )\\n internal\\n pure\\n returns (address target, uint256 value, bytes calldata callData)\\n {\\n target = address(bytes20(executionCalldata[0:20]));\\n value = uint256(bytes32(executionCalldata[20:52]));\\n callData = executionCalldata[52:];\\n }\\n\\n function encodeSingle(\\n address target,\\n uint256 value,\\n bytes memory callData\\n ) internal pure returns (bytes memory userOpCalldata) {\\n userOpCalldata = abi.encodePacked(target, value, callData);\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\n/**\\n * @title ModeLib\\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\\n * encoding is used.\\n * Function Signature of execute function:\\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\\n * context.\\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\\n * implement\\n * more complex execution modes may use the entire bytes32.\\n *\\n * |--------------------------------------------------------------------|\\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\\n * |--------------------------------------------------------------------|\\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\\n * |--------------------------------------------------------------------|\\n *\\n * CALLTYPE: 1 byte\\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\\n * decoded.\\n * It can be either single, batch or delegatecall. In the future different calls could be added.\\n * CALLTYPE can be used by a validation module to determine how to decode .\\n *\\n * EXECTYPE: 1 byte\\n * ExecType is used to determine how the account should handle the execution.\\n * It can indicate if the execution should revert on failure or continue execution.\\n * In the future more execution modes may be added.\\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\\n * a batch fails, the entire batch is reverted\\n *\\n * UNUSED: 4 bytes\\n * Unused bytes are reserved for future use.\\n *\\n * ModeSelector: bytes4\\n * The \\\"optional\\\" mode selector can be used by account vendors, to implement custom behavior in\\n * their accounts.\\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\\\"vendorname.featurename\\\"))\\n * this is to prevent collisions between different vendors, while allowing innovation and the\\n * development of new features without coordination between ERC-7579 implementing accounts\\n *\\n * ModePayload: 22 bytes\\n * Mode payload is used to pass additional data to the smart account execution, this may be\\n * interpreted depending on the ModeSelector\\n *\\n * ExecutionCallData: n bytes\\n * single, delegatecall or batch exec abi.encoded as bytes\\n */\\nimport { Execution } from \\\"../interfaces/IERC7579Account.sol\\\";\\n\\n// Custom type for improved developer experience\\ntype ModeCode is bytes32;\\n\\ntype CallType is bytes1;\\n\\ntype ExecType is bytes1;\\n\\ntype ModeSelector is bytes4;\\n\\ntype ModePayload is bytes22;\\n\\n// Default CallType\\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\\n// Batched CallType\\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\\n// @dev Implementing delegatecall is OPTIONAL!\\n// implement delegatecall with extreme care.\\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\\n\\n// @dev default behavior is to revert on failure\\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\\n// Since this is value 0x00, no additional encoding is required for simple accounts\\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\\n// @dev account may elect to change execution behavior. For example \\\"try exec\\\" / \\\"allow fail\\\"\\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\\n\\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\\n// Example declaration of a custom mode selector\\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\\\"default.mode.offset\\\")));\\n\\n/**\\n * @dev ModeLib is a helper library to encode/decode ModeCodes\\n */\\nlibrary ModeLib {\\n function decode(ModeCode mode)\\n internal\\n pure\\n returns (\\n CallType _calltype,\\n ExecType _execType,\\n ModeSelector _modeSelector,\\n ModePayload _modePayload\\n )\\n {\\n assembly {\\n _calltype := mode\\n _execType := shl(8, mode)\\n _modeSelector := shl(48, mode)\\n _modePayload := shl(80, mode)\\n }\\n }\\n\\n function encode(\\n CallType callType,\\n ExecType execType,\\n ModeSelector mode,\\n ModePayload payload\\n )\\n internal\\n pure\\n returns (ModeCode)\\n {\\n return ModeCode.wrap(\\n bytes32(\\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\\n )\\n );\\n }\\n\\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\\n }\\n\\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\\n }\\n\\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\\n assembly {\\n calltype := mode\\n }\\n }\\n}\\n\\nusing { eqModeSelector as == } for ModeSelector global;\\nusing { eqCallType as == } for CallType global;\\nusing { eqExecType as == } for ExecType global;\\n\\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\\n return CallType.unwrap(a) == CallType.unwrap(b);\\n}\\n\\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\\n return ExecType.unwrap(a) == ExecType.unwrap(b);\\n}\\n\\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\\n}\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol\": {\n \"content\": \"// https://github.com/zeroknots/sentinellist/\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\naddress constant SENTINEL = address(0x1);\\naddress constant ZERO_ADDRESS = address(0x0);\\n\\nlibrary SentinelListLib {\\n struct SentinelList {\\n mapping(address => address) entries;\\n }\\n\\n error LinkedList_AlreadyInitialized();\\n error LinkedList_InvalidPage();\\n error LinkedList_InvalidEntry(address entry);\\n error LinkedList_EntryAlreadyInList(address entry);\\n\\n function init(SentinelList storage self) internal {\\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\\n self.entries[SENTINEL] = SENTINEL;\\n }\\n\\n function alreadyInitialized(\\n SentinelList storage self\\n ) internal view returns (bool) {\\n return self.entries[SENTINEL] != ZERO_ADDRESS;\\n }\\n\\n function getNext(\\n SentinelList storage self,\\n address entry\\n ) internal view returns (address) {\\n if (entry == ZERO_ADDRESS) {\\n revert LinkedList_InvalidEntry(entry);\\n }\\n return self.entries[entry];\\n }\\n\\n function push(SentinelList storage self, address newEntry) internal {\\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\\n revert LinkedList_InvalidEntry(newEntry);\\n }\\n if (self.entries[newEntry] != ZERO_ADDRESS)\\n revert LinkedList_EntryAlreadyInList(newEntry);\\n self.entries[newEntry] = self.entries[SENTINEL];\\n self.entries[SENTINEL] = newEntry;\\n }\\n\\n function pop(\\n SentinelList storage self,\\n address prevEntry,\\n address popEntry\\n ) internal {\\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\\n revert LinkedList_InvalidEntry(prevEntry);\\n }\\n if (self.entries[prevEntry] != popEntry)\\n revert LinkedList_InvalidEntry(popEntry);\\n self.entries[prevEntry] = self.entries[popEntry];\\n self.entries[popEntry] = ZERO_ADDRESS;\\n }\\n\\n function contains(\\n SentinelList storage self,\\n address entry\\n ) internal view returns (bool) {\\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\\n }\\n\\n function getEntriesPaginated(\\n SentinelList storage self,\\n address start,\\n uint256 pageSize\\n ) internal view returns (address[] memory array, address next) {\\n if (start != SENTINEL && contains(self, start))\\n revert LinkedList_InvalidEntry(start);\\n if (pageSize == 0) revert LinkedList_InvalidPage();\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 entryCount = 0;\\n next = self.entries[start];\\n while (\\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\\n ) {\\n array[entryCount] = next;\\n next = self.entries[next];\\n entryCount++;\\n }\\n\\n /**\\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\\n *\\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\\n */\\n if (next != SENTINEL) {\\n next = array[entryCount - 1];\\n }\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(array, entryCount)\\n }\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport {Bootstrap, BootstrapConfig} from \\\"../utils/Bootstrap.sol\\\";\\nimport {IModule} from \\\"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\\\";\\n\\ncontract BootstrapUtil {\\n Bootstrap bootstrapSingleton;\\n\\n constructor() {\\n bootstrapSingleton = new Bootstrap();\\n }\\n\\n function _makeBootstrapConfig(\\n address module,\\n bytes memory data\\n ) public pure returns (BootstrapConfig memory config) {\\n config.module = module;\\n config.data = abi.encodeCall(IModule.onInstall, data);\\n }\\n\\n function makeBootstrapConfig(\\n address module,\\n bytes memory data\\n ) public pure returns (BootstrapConfig[] memory config) {\\n config = new BootstrapConfig[](1);\\n config[0].module = module;\\n config[0].data = abi.encodeCall(IModule.onInstall, data);\\n }\\n\\n function makeBootstrapConfig(\\n address[] memory modules,\\n bytes[] memory datas\\n ) public pure returns (BootstrapConfig[] memory configs) {\\n configs = new BootstrapConfig[](modules.length);\\n\\n for (uint256 i; i < modules.length; i++) {\\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\\n }\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport {IEntryPoint} from \\\"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\\\";\\nimport {EntryPoint, SenderCreator} from \\\"../../../../../account-abstraction/contracts/core/EntryPoint.sol\\\";\\nimport {EntryPointSimulations} from \\\"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\\\";\\n\\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\\n address _entrypointAddr = address(this);\\n\\n SenderCreator _newSenderCreator;\\n\\n function init(address entrypointAddr) public {\\n _entrypointAddr = entrypointAddr;\\n initSenderCreator();\\n }\\n\\n function initSenderCreator() internal override {\\n //this is the address of the first contract created with CREATE by this address.\\n address createdObj = address(\\n uint160(\\n uint256(\\n keccak256(\\n abi.encodePacked(hex\\\"d694\\\", _entrypointAddr, hex\\\"01\\\")\\n )\\n )\\n )\\n );\\n _newSenderCreator = SenderCreator(createdObj);\\n }\\n\\n function senderCreator()\\n internal\\n view\\n virtual\\n override\\n returns (SenderCreator)\\n {\\n return _newSenderCreator;\\n }\\n}\\n\\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\\n\\nfunction etchEntrypoint() returns (IEntryPoint) {\\n address payable entryPoint = payable(\\n address(new EntryPointSimulationsPatch())\\n );\\n etch(ENTRYPOINT_ADDR, entryPoint.code);\\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\\n\\n return IEntryPoint(ENTRYPOINT_ADDR);\\n}\\n\\nimport \\\"forge-std/Vm.sol\\\";\\n\\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\\n\\nfunction getAddr(uint256 pk) pure returns (address) {\\n return Vm(VM_ADDR).addr(pk);\\n}\\n\\nfunction sign(\\n uint256 pk,\\n bytes32 msgHash\\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\\n return Vm(VM_ADDR).sign(pk, msgHash);\\n}\\n\\nfunction etch(address target, bytes memory runtimeBytecode) {\\n Vm(VM_ADDR).etch(target, runtimeBytecode);\\n}\\n\\nfunction label(address _addr, string memory _label) {\\n Vm(VM_ADDR).label(_addr, _label);\\n}\\n\\nfunction expectEmit() {\\n Vm(VM_ADDR).expectEmit();\\n}\\n\\nfunction recordLogs() {\\n Vm(VM_ADDR).recordLogs();\\n}\\n\\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\\n return Vm(VM_ADDR).getRecordedLogs();\\n}\\n\\nfunction prank(address _addr) {\\n Vm(VM_ADDR).prank(_addr);\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport {IFallback} from \\\"../../interfaces/IERC7579Module.sol\\\";\\nimport {IERC7579Account, Execution} from \\\"../../interfaces/IERC7579Account.sol\\\";\\nimport {ExecutionLib} from \\\"../../libs/ExecutionLib.sol\\\";\\nimport {ModeLib} from \\\"../../libs/ModeLib.sol\\\";\\n\\nimport \\\"forge-std/console2.sol\\\";\\n\\ncontract MockFallback is IFallback {\\n function delegateCallTarget(\\n uint256 param\\n ) public view returns (uint256 _param, address sender, address _this) {\\n console2.log(\\n \\\"delegateCallTarget called with param: %s msg.sender: %s this: %s\\\",\\n param,\\n msg.sender,\\n address(this)\\n );\\n return (param, msg.sender, address(this));\\n }\\n\\n function callTarget(\\n uint256 param\\n )\\n public\\n view\\n returns (\\n uint256 _param,\\n address sender,\\n address er2771Sender,\\n address _this\\n )\\n {\\n console2.log(\\n \\\"callTarget called with param: %s msg.sender: %s this: %s\\\",\\n param,\\n msg.sender,\\n address(this)\\n );\\n return (param, msg.sender, _msgSender(), address(this));\\n }\\n\\n function staticCallTarget(\\n uint256 param\\n )\\n public\\n view\\n returns (\\n uint256 _param,\\n address sender,\\n address er2771Sender,\\n address _this\\n )\\n {\\n console2.log(\\n \\\"staticCall called with param: %s msg.sender: %s this: %s\\\",\\n param,\\n msg.sender,\\n address(this)\\n );\\n return (param, msg.sender, _msgSender(), address(this));\\n }\\n\\n function _msgSender() internal pure returns (address sender) {\\n // The assembly code is more direct than the Solidity version using `abi.decode`.\\n /* solhint-disable no-inline-assembly */\\n /// @solidity memory-safe-assembly\\n assembly {\\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n /* solhint-enable no-inline-assembly */\\n }\\n\\n function onInstall(bytes calldata data) external override {}\\n\\n function onUninstall(bytes calldata data) external override {}\\n\\n function isModuleType(\\n uint256 typeID\\n ) external view override returns (bool) {}\\n\\n function isInitialized(\\n address smartAccount\\n ) public view override returns (bool) {}\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport \\\"../core/ModuleManager.sol\\\";\\nimport \\\"../core/HookManager.sol\\\";\\n\\nimport \\\"../interfaces/IERC7579Module.sol\\\";\\n\\nstruct BootstrapConfig {\\n address module;\\n bytes data;\\n}\\n\\ncontract Bootstrap is ModuleManager, HookManager {\\n function singleInitMSA(IModule validator, bytes calldata data) external {\\n // init validator\\n _installValidator(address(validator), data);\\n }\\n\\n /**\\n * This function is intended to be called by the MSA with a delegatecall.\\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\\n * calling this function\\n */\\n function initMSA(\\n BootstrapConfig[] calldata $valdiators,\\n BootstrapConfig[] calldata $executors,\\n BootstrapConfig calldata _hook,\\n BootstrapConfig[] calldata _fallbacks\\n )\\n external\\n {\\n // init validators\\n for (uint256 i; i < $valdiators.length; i++) {\\n _installValidator($valdiators[i].module, $valdiators[i].data);\\n }\\n\\n // init executors\\n for (uint256 i; i < $executors.length; i++) {\\n if ($executors[i].module == address(0)) continue;\\n _installExecutor($executors[i].module, $executors[i].data);\\n }\\n\\n // init hook\\n if (_hook.module != address(0)) {\\n _installHook(_hook.module, _hook.data);\\n }\\n\\n // init fallback\\n for (uint256 i; i < _fallbacks.length; i++) {\\n if (_fallbacks[i].module == address(0)) continue;\\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\\n }\\n }\\n\\n function _getInitMSACalldata(\\n BootstrapConfig[] calldata $valdiators,\\n BootstrapConfig[] calldata $executors,\\n BootstrapConfig calldata _hook,\\n BootstrapConfig[] calldata _fallbacks\\n )\\n external\\n view\\n returns (bytes memory init)\\n {\\n init = abi.encode(\\n address(this),\\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\\n );\\n }\\n}\"\n },\n \"src/modular-etherspot-wallet/interfaces/IAccessController.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\ninterface IAccessController {\\n /// Structs\\n struct NewOwnerProposal {\\n address newOwnerProposed;\\n bool resolved;\\n address[] guardiansApproved;\\n uint256 approvalCount;\\n uint256 proposedAt;\\n }\\n\\n /// Events\\n event OwnerAdded(address account, address newOwner);\\n event OwnerRemoved(address account, address removedOwner);\\n event GuardianAdded(address account, address newGuardian);\\n event GuardianRemoved(address account, address removedGuardian);\\n event ProposalSubmitted(\\n address account,\\n uint256 proposalId,\\n address newOwnerProposed,\\n address proposer\\n );\\n event QuorumNotReached(\\n address account,\\n uint256 proposalId,\\n address newOwnerProposed,\\n uint256 approvalCount\\n );\\n event ProposalDiscarded(\\n address account,\\n uint256 proposalId,\\n address discardedBy\\n );\\n\\n /// External\\n function addOwner(address _newOwner) external;\\n\\n function removeOwner(address _owner) external;\\n\\n function addGuardian(address _newGuardian) external;\\n\\n function removeGuardian(address _guardian) external;\\n\\n function changeProposalTimelock(uint256 _newTimelock) external;\\n\\n function discardCurrentProposal() external;\\n\\n function guardianPropose(address _newOwner) external;\\n\\n function guardianCosign() external;\\n\\n /// Views\\n function isOwner(address _address) external view returns (bool);\\n\\n function isGuardian(address _address) external view returns (bool);\\n\\n function getProposal(\\n uint256 _proposalId\\n )\\n external\\n view\\n returns (\\n address ownerProposed_,\\n uint256 approvalCount_,\\n address[] memory guardiansApproved_,\\n bool resolved_,\\n uint256 proposedAt_\\n );\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport {IValidator} from \\\"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\\\";\\nimport {IERC7579Account} from \\\"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\\\";\\nimport {PackedUserOperation} from \\\"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\\\";\\n\\n/// @title ERC20SessionKeyValidator Interface\\n/// @author Etherspot\\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\\ninterface IERC20SessionKeyValidator is IValidator {\\n /// @notice Emitted when a new session key is enabled for a wallet.\\n /// @param sessionKey The address of the session key.\\n /// @param wallet The address of the wallet for which the session key is enabled.\\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\\n\\n /// @notice Emitted when a session key is disabled for a wallet.\\n /// @param sessionKey The address of the session key.\\n /// @param wallet The address of the wallet for which the session key is disabled.\\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\\n\\n /// @notice Struct representing the data associated with a session key.\\n struct SessionData {\\n address token; // The ERC20 token contract address.\\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\\n uint48 validAfter; // The timestamp after which the session key is valid.\\n uint48 validUntil; // The timestamp until which the session key is valid.\\n bool paused; // Flag indicating whether the session key is paused or not.\\n }\\n\\n /// @notice Enables a new session key for the caller's wallet.\\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\\n function enableSessionKey(bytes calldata _sessionData) external;\\n\\n /// @notice Disables a session key for the caller's wallet.\\n /// @param _session The address of the session key to disable.\\n function disableSessionKey(address _session) external;\\n\\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\\n /// @param _oldSessionKey The address of the old session key to disable.\\n /// @param _newSessionData The encoded session data for the new session key.\\n function rotateSessionKey(\\n address _oldSessionKey,\\n bytes calldata _newSessionData\\n ) external;\\n\\n /// @notice Toggles the pause state of a session key for the caller's wallet.\\n /// @param _sessionKey The address of the session key to toggle the pause state for.\\n function toggleSessionKeyPause(address _sessionKey) external;\\n\\n /// @notice Checks if a session key is paused for the caller's wallet.\\n /// @param _sessionKey The address of the session key to check.\\n /// @return paused True if the session key is paused, false otherwise.\\n function checkSessionKeyPaused(\\n address _sessionKey\\n ) external view returns (bool paused);\\n\\n /// @notice Validates the parameters of a session key for a given user operation.\\n /// @param _sessionKey The address of the session key.\\n /// @param userOp The packed user operation containing the call data.\\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\\n function validateSessionKeyParams(\\n address _sessionKey,\\n PackedUserOperation calldata userOp\\n ) external returns (bool valid);\\n\\n /// @notice Returns the list of associated session keys for the caller's wallet.\\n /// @return keys The array of associated session key addresses.\\n function getAssociatedSessionKeys()\\n external\\n view\\n returns (address[] memory keys);\\n\\n /// @notice Returns the session data for a given session key and the caller's wallet.\\n /// @param _sessionKey The address of the session key.\\n /// @return data The session data struct.\\n function getSessionKeyData(\\n address _sessionKey\\n ) external view returns (SessionData memory data);\\n\\n /// @notice Validates a user operation using a session key.\\n /// @param userOp The packed user operation.\\n /// @param userOpHash The hash of the user operation.\\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\\n function validateUserOp(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash\\n ) external returns (uint256 validationData);\\n\\n /// @notice Checks if the module type matches the validator module type.\\n /// @param moduleTypeId The module type ID to check.\\n /// @return True if the module type matches the validator module type, false otherwise.\\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\\n\\n /// @notice Placeholder function for module installation.\\n /// @param data The data to pass during installation.\\n function onInstall(bytes calldata data) external;\\n\\n /// @notice Placeholder function for module uninstallation.\\n /// @param data The data to pass during uninstallation.\\n function onUninstall(bytes calldata data) external;\\n\\n /// @notice Reverts with a \\\"NotImplemented\\\" error.\\n /// @param sender The address of the sender.\\n /// @param hash The hash of the message.\\n /// @param data The data associated with the message.\\n /// @return A bytes4 value indicating the function is not implemented.\\n function isValidSignatureWithSender(\\n address sender,\\n bytes32 hash,\\n bytes calldata data\\n ) external view returns (bytes4);\\n\\n /// @notice Reverts with a \\\"NotImplemented\\\" error.\\n /// @param smartAccount The address of the smart account.\\n /// @return True if the smart account is initialized, false otherwise.\\n function isInitialized(address smartAccount) external view returns (bool);\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport {IMSA} from \\\"../erc7579-ref-impl/interfaces/IMSA.sol\\\";\\nimport {IAccessController} from \\\"./IAccessController.sol\\\";\\n\\ninterface IModularEtherspotWallet is IMSA, IAccessController\\n{\\n error OnlyProxy();\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/libraries/ArrayLib.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary ArrayLib {\\n function _contains(\\n address[] memory A,\\n address a\\n ) internal pure returns (bool) {\\n (, bool isIn) = _indexOf(A, a);\\n return isIn;\\n }\\n\\n function _indexOf(\\n address[] memory A,\\n address a\\n ) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (0, false);\\n }\\n\\n function _removeElement(\\n address[] storage _data,\\n address _element\\n ) internal {\\n uint256 length = _data.length;\\n // remove item from array and resize array\\n for (uint256 ii = 0; ii < length; ii++) {\\n if (_data[ii] == _element) {\\n if (length > 1) {\\n _data[ii] = _data[length - 1];\\n }\\n _data.pop();\\n break;\\n }\\n }\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/libraries/ErrorsLib.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary ErrorsLib {\\n /// AccessController\\n error OnlyOwnerOrSelf();\\n error OnlyGuardian();\\n error OnlyOwnerOrGuardianOrSelf();\\n\\n error AddingInvalidOwner();\\n error RemovingInvalidOwner();\\n error AddingInvalidGuardian();\\n error RemovingInvalidGuardian();\\n\\n error WalletNeedsOwner();\\n error NotEnoughGuardians();\\n\\n error ProposalResolved();\\n error ProposalUnresolved();\\n error AlreadySignedProposal();\\n\\n error ProposalTimelocked();\\n error InvalidProposal();\\n\\n // EtherspotWallet7579 Errors\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IFallback} from \\\"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\\\";\\n\\ncontract ERC20Actions is IFallback {\\n function onInstall(bytes calldata data) external override {}\\n\\n function onUninstall(bytes calldata data) external override {}\\n function isModuleType(\\n uint256 moduleTypeId\\n ) external view override returns (bool) {}\\n\\n function isInitialized(address _mew) external view returns (bool) {}\\n function transferERC20Action(\\n address _token,\\n address _to,\\n uint256 _amount\\n ) external {\\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\\n }\\n\\n function invalidERC20Action() public pure returns (uint256) {\\n return 0;\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol\": {\n \"content\": \"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.13;\\n\\n/// @title ModuleIsolationHook\\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\\n/// @dev Implements preCheck hook to block restricted function calls\\n\\nimport {ModularEtherspotWallet} from \\\"../../wallet/ModularEtherspotWallet.sol\\\";\\nimport \\\"../../erc7579-ref-impl/libs/ModeLib.sol\\\";\\nimport \\\"../../erc7579-ref-impl/libs/ExecutionLib.sol\\\";\\nimport \\\"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\\\";\\n\\ncontract ModuleIsolationHook is IHook {\\n using ModeLib for ModeCode;\\n using ExecutionLib for bytes;\\n\\n /// @notice Records which modules this hook is installed for\\n mapping(address => bool) public installed;\\n\\n /// @notice Called when this hook is installed for a module\\n function onInstall(bytes calldata data) external override {\\n installed[msg.sender] = true;\\n }\\n\\n /// @notice Called when this hook is uninstalled for a module\\n function onUninstall(bytes calldata data) external override {\\n installed[msg.sender] = false;\\n }\\n /// @notice Checks if a signature is in a list\\n /// @param target Signature to check for\\n /// @param list List of signatures\\n /// @return bool True if target is in the list\\n function contains(\\n bytes4 target,\\n bytes4[] memory list\\n ) public view returns (bool) {\\n for (uint i; i < list.length; i++) {\\n if (target == list[i]) return true;\\n }\\n return false;\\n }\\n\\n /// @notice Main pre-call check for restricted signatures\\n /// @param msgSender Message sender address\\n /// @param msgData Message data\\n function preCheck(\\n address msgSender,\\n bytes calldata msgData\\n ) external override returns (bytes memory hookData) {\\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\\n if (\\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\\n ) {\\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\\n (CallType callType, ExecType execType, , ) = mode.decode();\\n integrityCheck(callType, msgData[68 + 32:]);\\n }\\n return \\\"\\\";\\n }\\n\\n /// @notice Checks message data and reverts on restricted signatures\\n /// @param callType Call type\\n /// @param executionCallData Call data\\n function integrityCheck(\\n CallType callType,\\n bytes calldata executionCallData\\n ) public {\\n bytes4[] memory bannedSigs = new bytes4[](5);\\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\\n\\n if (callType == CALLTYPE_BATCH) {\\n Execution[] calldata executions = executionCallData.decodeBatch();\\n for (uint i; i < executions.length; i++) {\\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\\n (bytes4(executions[i].callData[1]) >> 8) |\\n (bytes4(executions[i].callData[2]) >> 16) |\\n (bytes4(executions[i].callData[3]) >> 24);\\n require(\\n !contains(checkSig, bannedSigs),\\n \\\"MEW::ModuleIsolationHook:BannedSignature\\\"\\n );\\n }\\n } else if (callType == CALLTYPE_SINGLE) {\\n (\\n address target,\\n uint256 value,\\n bytes calldata callData\\n ) = executionCallData.decodeSingle();\\n\\n bytes4 checkSig = bytes4(callData[0]) |\\n (bytes4(callData[1]) >> 8) |\\n (bytes4(callData[2]) >> 16) |\\n (bytes4(callData[3]) >> 24);\\n require(\\n !contains(checkSig, bannedSigs),\\n \\\"MEW::ModuleIsolationHook:BannedSignature\\\"\\n );\\n } else if (callType == CALLTYPE_DELEGATECALL) {\\n bytes4 checkSig = bytes4(executionCallData[0]) |\\n (bytes4(executionCallData[1]) >> 8) |\\n (bytes4(executionCallData[2]) >> 16) |\\n (bytes4(executionCallData[3]) >> 24);\\n require(\\n !contains(checkSig, bannedSigs),\\n \\\"MEW::ModuleIsolationHook:BannedSignature\\\"\\n );\\n }\\n }\\n\\n /// @notice Main pre-call check for restricted signatures\\n /// @param hookData Message sender address\\n function postCheck(\\n bytes calldata hookData\\n ) external returns (bool success) {}\\n\\n /// @notice Checks if this contract is a hook module type\\n /// @param typeID Module type ID\\n /// @return bool True if module type is HOOK\\n function isModuleType(\\n uint256 typeID\\n ) external view override returns (bool) {\\n return MODULE_TYPE_HOOK == typeID;\\n }\\n\\n /// @notice Checks if this hook is installed for a wallet\\n /// @param smartAccount Wallet address\\n /// @return bool True if this hook is installed for the wallet\\n function isInitialized(\\n address smartAccount\\n ) external view override returns (bool) {\\n return installed[smartAccount];\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.23;\\n\\nimport {ECDSA} from \\\"solady/src/utils/ECDSA.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {EIP712} from \\\"solady/src/utils/EIP712.sol\\\";\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \\\"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\\\";\\nimport {PackedUserOperation} from \\\"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\\\";\\nimport \\\"../../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"../../erc7579-ref-impl/libs/ModeLib.sol\\\";\\nimport \\\"../../erc7579-ref-impl/libs/ExecutionLib.sol\\\";\\n\\nimport {ModularEtherspotWallet} from \\\"../../wallet/ModularEtherspotWallet.sol\\\";\\nimport {IERC20SessionKeyValidator} from \\\"../../interfaces/IERC20SessionKeyValidator.sol\\\";\\nimport {ERC20Actions} from \\\"../executors/ERC20Actions.sol\\\";\\n\\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\\n using ModeLib for ModeCode;\\n using ExecutionLib for bytes;\\n\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n /* CONSTANTS */\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n\\n /// @dev `keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")`.\\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\\n string constant NAME = \\\"ERC20SessionKeyValidator\\\";\\n string constant VERSION = \\\"1.0.0\\\";\\n\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n /* ERRORS */\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n\\n error ERC20SKV_InvalidSessionKey();\\n error ERC20SKV_SessionKeyDoesNotExist(address session);\\n error ERC20SKV_SessionPaused(address sessionKey);\\n error ERC20SKV_UnsuportedToken();\\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\\n error ERC20SKV_UnsupportedInterface();\\n error ERC20SKV_SessionKeySpendLimitExceeded();\\n error ERC20SKV_InsufficientApprovalAmount();\\n error NotImplemented();\\n\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n /* MAPPINGS */\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n\\n mapping(address => bool) public initialized;\\n mapping(address wallet => address[] assocSessionKeys)\\n public walletSessionKeys;\\n mapping(address sessionKey => mapping(address wallet => SessionData))\\n public sessionData;\\n\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n /* PUBLIC/EXTERNAL */\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function enableSessionKey(bytes calldata _sessionData) public {\\n address sessionKey = address(bytes20(_sessionData[0:20]));\\n address token = address(bytes20(_sessionData[20:40]));\\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\\n sessionData[sessionKey][msg.sender] = SessionData(\\n token,\\n interfaceId,\\n funcSelector,\\n spendingLimit,\\n validAfter,\\n validUntil,\\n false\\n );\\n walletSessionKeys[msg.sender].push(sessionKey);\\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function disableSessionKey(address _session) public {\\n if (sessionData[_session][msg.sender].validUntil == 0)\\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\\n delete sessionData[_session][msg.sender];\\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function rotateSessionKey(\\n address _oldSessionKey,\\n bytes calldata _newSessionData\\n ) external {\\n disableSessionKey(_oldSessionKey);\\n enableSessionKey(_newSessionData);\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function toggleSessionKeyPause(address _sessionKey) external {\\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\\n sd.paused = !sd.paused;\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function checkSessionKeyPaused(\\n address _sessionKey\\n ) public view returns (bool paused) {\\n return sessionData[_sessionKey][msg.sender].paused;\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function validateSessionKeyParams(\\n address _sessionKey,\\n PackedUserOperation calldata userOp\\n ) public returns (bool valid) {\\n bytes calldata callData = userOp.callData;\\n (\\n bytes4 selector,\\n address target,\\n address to,\\n address from,\\n uint256 amount\\n ) = _digest(callData);\\n\\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\\n revert ERC20SKV_InvalidSessionKey();\\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\\n revert ERC20SKV_UnsupportedInterface();\\n if (selector != sd.funcSelector)\\n revert ERC20SKV_UnsupportedSelector(selector);\\n if (amount > sd.spendingLimit)\\n revert ERC20SKV_SessionKeySpendLimitExceeded();\\n if (checkSessionKeyPaused(_sessionKey))\\n revert ERC20SKV_SessionPaused(_sessionKey);\\n return true;\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function getAssociatedSessionKeys()\\n public\\n view\\n returns (address[] memory keys)\\n {\\n return walletSessionKeys[msg.sender];\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function getSessionKeyData(\\n address _sessionKey\\n ) public view returns (SessionData memory data) {\\n return sessionData[_sessionKey][msg.sender];\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function validateUserOp(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash\\n ) external override returns (uint256 validationData) {\\n // EIP712\\n bytes32 domainSeparator = _domainSeparator();\\n bytes32 signedMessageHash = keccak256(\\n abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, userOpHash)\\n );\\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\\n\\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\\n return VALIDATION_FAILED;\\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\\n return _packValidationData(false, sd.validUntil, sd.validAfter);\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function isModuleType(\\n uint256 moduleTypeId\\n ) external pure override returns (bool) {\\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function onInstall(bytes calldata data) external override {\\n initialized[msg.sender] = true;\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function onUninstall(bytes calldata data) external override {\\n address[] memory sessionKeys = getAssociatedSessionKeys();\\n for (uint256 i; i < sessionKeys.length; i++) {\\n delete sessionData[sessionKeys[i]][msg.sender];\\n }\\n initialized[msg.sender] = false;\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function isValidSignatureWithSender(\\n address sender,\\n bytes32 hash,\\n bytes calldata data\\n ) external view returns (bytes4) {\\n revert NotImplemented();\\n }\\n\\n // @inheritdoc IERC20SessionKeyValidator\\n function isInitialized(address smartAccount) external view returns (bool) {\\n revert NotImplemented();\\n }\\n\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n /* INTERNAL */\\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\\n\\n function _digest(\\n bytes calldata _data\\n )\\n internal\\n pure\\n returns (\\n bytes4 selector,\\n address targetContract,\\n address to,\\n address from,\\n uint256 amount\\n )\\n {\\n bytes4 functionSelector;\\n assembly {\\n functionSelector := calldataload(_data.offset)\\n targetContract := calldataload(add(_data.offset, 0x04))\\n }\\n if (\\n functionSelector == IERC20.approve.selector ||\\n functionSelector == IERC20.transfer.selector ||\\n functionSelector == ERC20Actions.transferERC20Action.selector\\n ) {\\n assembly {\\n targetContract := calldataload(add(_data.offset, 0x04))\\n to := calldataload(add(_data.offset, 0x24))\\n amount := calldataload(add(_data.offset, 0x44))\\n }\\n return (functionSelector, targetContract, to, address(0), amount);\\n } else if (functionSelector == IERC20.transferFrom.selector) {\\n assembly {\\n targetContract := calldataload(add(_data.offset, 0x04))\\n from := calldataload(add(_data.offset, 0x24))\\n to := calldataload(add(_data.offset, 0x44))\\n amount := calldataload(add(_data.offset, 0x64))\\n }\\n return (functionSelector, targetContract, to, from, amount);\\n } else {\\n revert ERC20SKV_UnsupportedSelector(functionSelector);\\n }\\n }\\n\\n function _domainSeparator() internal view override returns (bytes32) {\\n (string memory _name, string memory _version) = _domainNameAndVersion();\\n bytes32 nameHash = keccak256(bytes(_name));\\n bytes32 versionHash = keccak256(bytes(_version));\\n // Use the proxy address for the EIP-712 domain separator.\\n address proxyAddress = address(this);\\n\\n // Construct the domain separator with name, version, chainId, and proxy address.\\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\\n return\\n keccak256(\\n abi.encode(\\n typeHash,\\n nameHash,\\n versionHash,\\n block.chainid,\\n proxyAddress\\n )\\n );\\n }\\n\\n function _domainNameAndVersion()\\n internal\\n pure\\n override\\n returns (string memory, string memory)\\n {\\n return (NAME, VERSION);\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport \\\"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\\\";\\nimport \\\"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\\\";\\nimport \\\"../../erc7579-ref-impl/libs/ModeLib.sol\\\";\\nimport \\\"../../erc7579-ref-impl/libs/ExecutionLib.sol\\\";\\nimport {ModularEtherspotWallet} from \\\"../../wallet/ModularEtherspotWallet.sol\\\";\\nimport {ECDSA} from \\\"solady/src/utils/ECDSA.sol\\\";\\nimport {EIP712} from \\\"solady/src/utils/EIP712.sol\\\";\\n\\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\\n using ExecutionLib for bytes;\\n using ECDSA for bytes32;\\n\\n /// @dev `keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")`.\\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\\n string constant NAME = \\\"MultipleOwnerECDSAValidator\\\";\\n string constant VERSION = \\\"1.0.0\\\";\\n\\n error InvalidExec();\\n\\n mapping(address => bool) internal _initialized;\\n\\n function onInstall(bytes calldata data) external override {\\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\\n _initialized[msg.sender] = true;\\n }\\n\\n function onUninstall(bytes calldata data) external override {\\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\\n _initialized[msg.sender] = false;\\n }\\n\\n function isInitialized(\\n address smartAccount\\n ) public view override returns (bool) {\\n return _initialized[smartAccount];\\n }\\n\\n function isModuleType(\\n uint256 typeID\\n ) external pure override returns (bool) {\\n return typeID == MODULE_TYPE_VALIDATOR;\\n }\\n\\n function validateUserOp(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash\\n ) external override returns (uint256) {\\n bytes32 hash = userOpHash.toEthSignedMessageHash();\\n address signer = hash.recover(userOp.signature);\\n if (\\n signer == address(0) ||\\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\\n ) {\\n return VALIDATION_FAILED;\\n }\\n // get the function selector that will be called by EntryPoint\\n bytes4 execFunction = bytes4(userOp.callData[:4]);\\n\\n // get the mode\\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\\n bytes calldata executionCalldata = userOp.callData[36:];\\n if (callType == CALLTYPE_BATCH) {\\n Execution[] calldata executions = executionCalldata.decodeBatch();\\n } else if (callType == CALLTYPE_SINGLE) {\\n (\\n address target,\\n uint256 value,\\n bytes calldata callData\\n ) = executionCalldata.decodeSingle();\\n }\\n }\\n\\n function isValidSignatureWithSender(\\n address,\\n bytes32 hash,\\n bytes calldata data\\n ) external view override returns (bytes4) {\\n // Include the proxy address in the domain separator\\n bytes32 domainSeparator = _domainSeparator();\\n bytes32 signedMessageHash = keccak256(\\n abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, hash)\\n );\\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\\n address owner = ECDSA.recover(ethHash, data);\\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\\n return 0x1626ba7e;\\n }\\n return 0xffffffff;\\n }\\n\\n function _domainSeparator() internal view override returns (bytes32) {\\n (string memory _name, string memory _version) = _domainNameAndVersion();\\n bytes32 nameHash = keccak256(bytes(_name));\\n bytes32 versionHash = keccak256(bytes(_version));\\n // Use the proxy address for the EIP-712 domain separator.\\n address proxyAddress = address(this);\\n\\n // Construct the domain separator with name, version, chainId, and proxy address.\\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\\n return\\n keccak256(\\n abi.encode(\\n typeHash,\\n nameHash,\\n versionHash,\\n block.chainid,\\n proxyAddress\\n )\\n );\\n }\\n\\n function _domainNameAndVersion()\\n internal\\n pure\\n override\\n returns (string memory, string memory)\\n {\\n return (NAME, VERSION);\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/test/TestERC20.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\ncontract TestERC20 is ERC20, ERC165 {\\n constructor() ERC20(\\\"TERC20\\\", \\\"TestERC20\\\") {}\\n\\n function mint(address sender, uint256 amount) external {\\n _mint(sender, amount);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view virtual override returns (bool) {\\n return\\n interfaceId == type(IERC20).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/utils/ERC4337Utils.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {IEntryPoint} from \\\"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\\\";\\nimport {PackedUserOperation} from \\\"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\\\";\\nimport \\\"solady/src/utils/ECDSA.sol\\\";\\nimport {Vm} from \\\"forge-std/Test.sol\\\";\\n\\nlibrary ERC4337Utils {\\n function fillUserOp(\\n IEntryPoint _entryPoint,\\n address _sender,\\n bytes memory _data\\n ) internal view returns (PackedUserOperation memory op) {\\n op.sender = _sender;\\n op.nonce = _entryPoint.getNonce(_sender, 0);\\n op.callData = _data;\\n op.accountGasLimits = bytes32(\\n abi.encodePacked(uint128(2e6), uint128(2e6))\\n );\\n op.preVerificationGas = 50000;\\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\\n }\\n\\n function signUserOpHash(\\n IEntryPoint _entryPoint,\\n Vm _vm,\\n uint256 _key,\\n PackedUserOperation memory _op\\n ) internal view returns (bytes memory signature) {\\n bytes32 hash = _entryPoint.getUserOpHash(_op);\\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\\n _key,\\n ECDSA.toEthSignedMessageHash(hash)\\n );\\n signature = abi.encodePacked(r, s, v);\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport \\\"../erc7579-ref-impl/libs/ModeLib.sol\\\";\\nimport {ExecutionLib} from \\\"../erc7579-ref-impl/libs/ExecutionLib.sol\\\";\\nimport {ExecutionHelper} from \\\"../erc7579-ref-impl/core/ExecutionHelper.sol\\\";\\nimport {PackedUserOperation} from \\\"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\\\";\\nimport \\\"../erc7579-ref-impl/interfaces/IERC7579Module.sol\\\";\\nimport {IModularEtherspotWallet} from \\\"../interfaces/IModularEtherspotWallet.sol\\\";\\nimport {ModuleManager} from \\\"../erc7579-ref-impl/core/ModuleManager.sol\\\";\\nimport {HookManager} from \\\"../erc7579-ref-impl/core/HookManager.sol\\\";\\nimport {AccessController} from \\\"../access/AccessController.sol\\\";\\n\\ncontract ModularEtherspotWallet is\\n AccessController,\\n IModularEtherspotWallet,\\n ExecutionHelper,\\n ModuleManager,\\n HookManager\\n{\\n using ExecutionLib for bytes;\\n using ModeLib for ModeCode;\\n address public immutable implementation = address(this);\\n\\n /**\\n * @dev modifier to restrict access to calling on implementation\\n */\\n modifier onlyProxy() {\\n if (address(this) == implementation) revert OnlyProxy();\\n _;\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n * @dev this function is only callable by the entry point or the account itself\\n * @dev this function demonstrates how to implement\\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\\n * @dev this function demonstrates how to implement hook support (modifier)\\n */\\n function execute(\\n ModeCode mode,\\n bytes calldata executionCalldata\\n ) external payable onlyEntryPointOrSelf withHook {\\n (CallType callType, ExecType execType, , ) = mode.decode();\\n\\n // check if calltype is batch or single\\n if (callType == CALLTYPE_BATCH) {\\n // destructure executionCallData according to batched exec\\n Execution[] calldata executions = executionCalldata.decodeBatch();\\n // check if execType is revert or try\\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\\n else revert UnsupportedExecType(execType);\\n } else if (callType == CALLTYPE_SINGLE) {\\n // destructure executionCallData according to single exec\\n (\\n address target,\\n uint256 value,\\n bytes calldata callData\\n ) = executionCalldata.decodeSingle();\\n // check if execType is revert or try\\n if (execType == EXECTYPE_DEFAULT)\\n _execute(target, value, callData);\\n // TODO: implement event emission for tryExecute singleCall\\n else if (execType == EXECTYPE_TRY)\\n _tryExecute(target, value, callData);\\n else revert UnsupportedExecType(execType);\\n } else if (callType == CALLTYPE_DELEGATECALL) {\\n // destructure executionCallData according to single exec\\n address delegate = address(\\n uint160(bytes20(executionCalldata[0:20]))\\n );\\n bytes calldata callData = executionCalldata[20:];\\n // check if execType is revert or try\\n if (execType == EXECTYPE_DEFAULT)\\n _executeDelegatecall(delegate, callData);\\n else if (execType == EXECTYPE_TRY)\\n _tryExecuteDelegatecall(delegate, callData);\\n else revert UnsupportedExecType(execType);\\n } else {\\n revert UnsupportedCallType(callType);\\n }\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n * @dev this function is only callable by an installed executor module\\n * @dev this function demonstrates how to implement\\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\\n * @dev this function demonstrates how to implement hook support (modifier)\\n */\\n function executeFromExecutor(\\n ModeCode mode,\\n bytes calldata executionCalldata\\n )\\n external\\n payable\\n onlyExecutorModule\\n withHook\\n returns (\\n bytes[] memory returnData // TODO returnData is not used\\n )\\n {\\n (CallType callType, ExecType execType, , ) = mode.decode();\\n\\n // check if calltype is batch or single\\n if (callType == CALLTYPE_BATCH) {\\n // destructure executionCallData according to batched exec\\n Execution[] calldata executions = executionCalldata.decodeBatch();\\n // check if execType is revert or try\\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\\n else if (execType == EXECTYPE_TRY)\\n returnData = _tryExecute(executions);\\n else revert UnsupportedExecType(execType);\\n } else if (callType == CALLTYPE_SINGLE) {\\n // destructure executionCallData according to single exec\\n (\\n address target,\\n uint256 value,\\n bytes calldata callData\\n ) = executionCalldata.decodeSingle();\\n returnData = new bytes[](1);\\n bool success;\\n // check if execType is revert or try\\n if (execType == EXECTYPE_DEFAULT) {\\n returnData[0] = _execute(target, value, callData);\\n }\\n // TODO: implement event emission for tryExecute singleCall\\n else if (execType == EXECTYPE_TRY) {\\n (success, returnData[0]) = _tryExecute(target, value, callData);\\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\\n } else {\\n revert UnsupportedExecType(execType);\\n }\\n } else if (callType == CALLTYPE_DELEGATECALL) {\\n // destructure executionCallData according to single exec\\n address delegate = address(\\n uint160(bytes20(executionCalldata[0:20]))\\n );\\n bytes calldata callData = executionCalldata[20:];\\n // check if execType is revert or try\\n if (execType == EXECTYPE_DEFAULT)\\n _executeDelegatecall(delegate, callData);\\n else if (execType == EXECTYPE_TRY)\\n _tryExecuteDelegatecall(delegate, callData);\\n else revert UnsupportedExecType(execType);\\n } else {\\n revert UnsupportedCallType(callType);\\n }\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function executeUserOp(\\n PackedUserOperation calldata userOp\\n ) external payable onlyEntryPointOrSelf {\\n bytes calldata callData = userOp.callData[4:];\\n (bool success, ) = address(this).delegatecall(callData);\\n if (!success) revert ExecutionFailed();\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function installModule(\\n uint256 moduleTypeId,\\n address module,\\n bytes calldata initData\\n ) external payable onlyEntryPointOrSelf {\\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\\n _installValidator(module, initData);\\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\\n _installExecutor(module, initData);\\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\\n _installFallbackHandler(module, initData);\\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\\n _installHook(module, initData);\\n else revert UnsupportedModuleType(moduleTypeId);\\n emit ModuleInstalled(moduleTypeId, module);\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function uninstallModule(\\n uint256 moduleTypeId,\\n address module,\\n bytes calldata deInitData\\n ) external payable onlyEntryPointOrSelf {\\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\\n _uninstallValidator(module, deInitData);\\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\\n _uninstallExecutor(module, deInitData);\\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\\n _uninstallFallbackHandler(module, deInitData);\\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\\n _uninstallHook(module, deInitData);\\n } else {\\n revert UnsupportedModuleType(moduleTypeId);\\n }\\n emit ModuleUninstalled(moduleTypeId, module);\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function validateUserOp(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n uint256 missingAccountFunds\\n )\\n external\\n payable\\n virtual\\n override\\n onlyEntryPoint\\n payPrefund(missingAccountFunds)\\n returns (uint256 validSignature)\\n {\\n address validator;\\n // @notice validator encoding in nonce is just an example!\\n // @notice this is not part of the standard!\\n // Account Vendors may choose any other way to implement validator selection\\n uint256 nonce = userOp.nonce;\\n assembly {\\n validator := shr(96, nonce)\\n }\\n\\n // check if validator is enabled. If not terminate the validation phase.\\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\\n\\n // bubble up the return value of the validator module\\n validSignature = IValidator(validator).validateUserOp(\\n userOp,\\n userOpHash\\n );\\n }\\n\\n /**\\n * @dev ERC-1271 isValidSignature\\n * This function is intended to be used to validate a smart account signature\\n * and may forward the call to a validator module\\n *\\n * @param hash The hash of the data that is signed\\n * @param data The data that is signed\\n */\\n function isValidSignature(\\n bytes32 hash,\\n bytes calldata data\\n ) external view virtual override returns (bytes4) {\\n address validator = address(bytes20(data[0:20]));\\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\\n return\\n IValidator(validator).isValidSignatureWithSender(\\n msg.sender,\\n hash,\\n data[20:]\\n );\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function isModuleInstalled(\\n uint256 moduleTypeId,\\n address module,\\n bytes calldata additionalContext\\n ) external view override returns (bool) {\\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\\n return _isValidatorInstalled(module);\\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\\n return _isExecutorInstalled(module);\\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\\n return\\n _isFallbackHandlerInstalled(\\n abi.decode(additionalContext, (bytes4)),\\n module\\n );\\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\\n return _isHookInstalled(module);\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function accountId()\\n external\\n view\\n virtual\\n override\\n returns (string memory)\\n {\\n return \\\"etherspotwallet.modular.v1.0.0\\\";\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function supportsExecutionMode(\\n ModeCode mode\\n ) external view virtual override returns (bool isSupported) {\\n (CallType callType, ExecType execType, , ) = mode.decode();\\n if (callType == CALLTYPE_BATCH) isSupported = true;\\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\\n else if (callType == CALLTYPE_DELEGATECALL)\\n isSupported = true;\\n // if callType is not single, batch or delegatecall return false\\n else return false;\\n\\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\\n else if (execType == EXECTYPE_TRY)\\n isSupported = true;\\n // if execType is not default or try, return false\\n else return false;\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function supportsModule(\\n uint256 modulTypeId\\n ) external view virtual override returns (bool) {\\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\\n else return false;\\n }\\n\\n /**\\n * @dev see {IERC7579Account}.\\n */\\n function initializeAccount(\\n bytes calldata data\\n ) public payable virtual onlyProxy {\\n _initModuleManager();\\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\\n .decode(data, (address, address, bytes));\\n _addOwner(owner);\\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\\n if (!success) revert AccountInitializationFailed();\\n }\\n}\\n\"\n },\n \"src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.21;\\n\\nimport {LibClone} from \\\"solady/src/utils/LibClone.sol\\\";\\nimport {IModularEtherspotWallet} from \\\"../interfaces/IModularEtherspotWallet.sol\\\";\\n\\ncontract ModularEtherspotWalletFactory {\\n address public immutable implementation;\\n\\n constructor(address _implementation) {\\n implementation = _implementation;\\n }\\n\\n function createAccount(\\n bytes32 salt,\\n bytes calldata initCode\\n ) public payable virtual returns (address) {\\n bytes32 _salt = _getSalt(salt, initCode);\\n (bool alreadyDeployed, address account) = LibClone\\n .createDeterministicERC1967(msg.value, implementation, _salt);\\n\\n if (!alreadyDeployed) {\\n IModularEtherspotWallet(account).initializeAccount(initCode);\\n }\\n return account;\\n }\\n\\n function getAddress(\\n bytes32 salt,\\n bytes calldata initcode\\n ) public view virtual returns (address) {\\n bytes32 _salt = _getSalt(salt, initcode);\\n return\\n LibClone.predictDeterministicAddressERC1967(\\n implementation,\\n _salt,\\n address(this)\\n );\\n }\\n\\n function _getSalt(\\n bytes32 _salt,\\n bytes calldata initCode\\n ) public pure virtual returns (bytes32 salt) {\\n salt = keccak256(abi.encodePacked(_salt, initCode));\\n }\\n}\\n\"\n }\n },\n \"settings\": {\n \"optimizer\": {\n \"enabled\": true,\n \"runs\": 200\n },\n \"evmVersion\": \"london\",\n \"outputSelection\": {\n \"*\": {\n \"*\": [\n \"abi\",\n \"evm.bytecode\",\n \"evm.deployedBytecode\",\n \"evm.methodIdentifiers\",\n \"metadata\",\n \"storageLayout\",\n \"devdoc\",\n \"userdoc\",\n \"evm.gasEstimates\"\n ],\n \"\": [\n \"ast\"\n ]\n }\n },\n \"metadata\": {\n \"useLiteralContent\": true\n }\n }\n}", + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "transactionHash": "0x836491a90cf243a9b253fcf52ab406ff079092ed369ba1998934346fb418a9a7", + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ] + }, + "decoded": { + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "gasPrice": "600000007", + "maxFeePerGas": "600000008", + "maxPriorityFeePerGas": "600000000", + "gasLimit": "1081636", + "to": null, + "value": "0", + "nonce": 13, + "data": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c634300081700330000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032000000000000000000000000aeaf09795d8c0e6fa4bb5f89dc9c15ec02021567", + "r": "0x401cb8992103a63c375ea46319c5036ac8f1d97d4add6a57c49e1b96399df260", + "s": "0x4e9086780a885647149d03086133632e5a8501ec1cf033da766ece0df0388e6d", + "v": 0, + "chainId": 59140 + } + } +} \ No newline at end of file diff --git a/deployments/mantleSepolia/VerifyingPaymaster.json b/deployments/mantleSepolia/VerifyingPaymaster.json new file mode 100644 index 00000000..826c5361 --- /dev/null +++ b/deployments/mantleSepolia/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x42963C58DE382D34CB5a7f77b703e645FcE6DD26", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x61660cc6345b39f80c5033857affeee48ee18771fd4e497b12d7d4eba29647fa", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x42963C58DE382D34CB5a7f77b703e645FcE6DD26", + "transactionIndex": 1, + "gasUsed": "9115287094", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000001000000000000000000000000000000000000020400000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000200000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x623a7c23de2e34ca57dde4b59e957a49c5b11613b19129164d0bff484bf13888", + "transactionHash": "0x61660cc6345b39f80c5033857affeee48ee18771fd4e497b12d7d4eba29647fa", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 9786680, + "transactionHash": "0x61660cc6345b39f80c5033857affeee48ee18771fd4e497b12d7d4eba29647fa", + "address": "0x42963C58DE382D34CB5a7f77b703e645FcE6DD26", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x623a7c23de2e34ca57dde4b59e957a49c5b11613b19129164d0bff484bf13888" + } + ], + "blockNumber": 9786680, + "cumulativeGasUsed": "9115333983", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/mantleSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/mantleSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/mantleSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/optimismSepolia/VerifyingPaymaster.json b/deployments/optimismSepolia/VerifyingPaymaster.json new file mode 100644 index 00000000..4a077312 --- /dev/null +++ b/deployments/optimismSepolia/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x51a62e2B1E295CAe7Db5b91886735f9Ce335AcFB", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x7341687abecb6573e1299e773a720dfb4e1e3ec6b2ea9e4c27b1c0e4547f851f", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x51a62e2B1E295CAe7Db5b91886735f9Ce335AcFB", + "transactionIndex": 5, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000000020000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000100000000000000000000020000002000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4cb498074e49157a11178aadd13a6ea58c8a571cd656d13cbff5b54ef1bc3faa", + "transactionHash": "0x7341687abecb6573e1299e773a720dfb4e1e3ec6b2ea9e4c27b1c0e4547f851f", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 14657592, + "transactionHash": "0x7341687abecb6573e1299e773a720dfb4e1e3ec6b2ea9e4c27b1c0e4547f851f", + "address": "0x51a62e2B1E295CAe7Db5b91886735f9Ce335AcFB", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 81, + "blockHash": "0x4cb498074e49157a11178aadd13a6ea58c8a571cd656d13cbff5b54ef1bc3faa" + } + ], + "blockNumber": 14657592, + "cumulativeGasUsed": "4226814", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/optimismSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/optimismSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/optimismSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/rootstockTestnet/VerifyingPaymaster.json b/deployments/rootstockTestnet/VerifyingPaymaster.json new file mode 100644 index 00000000..73df6531 --- /dev/null +++ b/deployments/rootstockTestnet/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x805650ce74561C85baA44a8Bd13E19633Fd0F79d", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x06026068d15386a8ef6b0bd1fdc104494af00d14458994853a1cb32064d671e4", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x805650ce74561C85baA44a8Bd13E19633Fd0F79d", + "transactionIndex": 5, + "gasUsed": "1075936", + "logsBloom": "0x00000000000000000000000000000000000000000000000200800000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000020000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x23fc1183a2b29eea930562401271bc6218ebdf6d94b7d1c39b7c42dce4105421", + "transactionHash": "0x06026068d15386a8ef6b0bd1fdc104494af00d14458994853a1cb32064d671e4", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 5333034, + "transactionHash": "0x06026068d15386a8ef6b0bd1fdc104494af00d14458994853a1cb32064d671e4", + "address": "0x805650ce74561C85baA44a8Bd13E19633Fd0F79d", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x23fc1183a2b29eea930562401271bc6218ebdf6d94b7d1c39b7c42dce4105421" + } + ], + "blockNumber": 5333034, + "cumulativeGasUsed": "1460463", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/rootstockTestnet/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/rootstockTestnet/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/rootstockTestnet/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/scrollSepolia/VerifyingPaymaster.json b/deployments/scrollSepolia/VerifyingPaymaster.json new file mode 100644 index 00000000..90461a05 --- /dev/null +++ b/deployments/scrollSepolia/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x31cd94833b6182b385489d523775e7a8d2695ca6ec2dc3d1cce27bbd0ac1863e", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "transactionIndex": 1, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000100000000000000000000000000000001000000000", + "blockHash": "0xb6d4ba3f0076acc5b299dac0a0c546067bc56c9ef541e92796603dd8f9fd4127", + "transactionHash": "0x31cd94833b6182b385489d523775e7a8d2695ca6ec2dc3d1cce27bbd0ac1863e", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 5505935, + "transactionHash": "0x31cd94833b6182b385489d523775e7a8d2695ca6ec2dc3d1cce27bbd0ac1863e", + "address": "0xD9A97785a91086FDeF17980eDC2f9D290d71153F", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xb6d4ba3f0076acc5b299dac0a0c546067bc56c9ef541e92796603dd8f9fd4127" + } + ], + "blockNumber": 5505935, + "cumulativeGasUsed": "1102962", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/scrollSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/scrollSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/scrollSepolia/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/VerifyingPaymaster.json b/deployments/sepolia/VerifyingPaymaster.json new file mode 100644 index 00000000..6f44373b --- /dev/null +++ b/deployments/sepolia/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x8B57f6b24C7cd85007068Bf0587382804B225DB6", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x87979ca8eb0418efec4f43b229dd3daf145ab9432d9788b66d90b80e466c793e", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x8B57f6b24C7cd85007068Bf0587382804B225DB6", + "transactionIndex": 33, + "gasUsed": "1081962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000040000000000000000020000000000000000000800000000000000000080000000000000420000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xdd89520109eb30092d81b2ffb4e6e083a3e4961a69a5c3f5fc0abdfee3631ea1", + "transactionHash": "0x87979ca8eb0418efec4f43b229dd3daf145ab9432d9788b66d90b80e466c793e", + "logs": [ + { + "transactionIndex": 33, + "blockNumber": 6319774, + "transactionHash": "0x87979ca8eb0418efec4f43b229dd3daf145ab9432d9788b66d90b80e466c793e", + "address": "0x8B57f6b24C7cd85007068Bf0587382804B225DB6", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 125, + "blockHash": "0xdd89520109eb30092d81b2ffb4e6e083a3e4961a69a5c3f5fc0abdfee3631ea1" + } + ], + "blockNumber": 6319774, + "cumulativeGasUsed": "9226185", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/sepolia/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/sepolia/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/xdcApothem/.chainId b/deployments/xdcApothem/.chainId new file mode 100644 index 00000000..7003e7fe --- /dev/null +++ b/deployments/xdcApothem/.chainId @@ -0,0 +1 @@ +51 \ No newline at end of file diff --git a/deployments/xdcApothem/VerifyingPaymaster.json b/deployments/xdcApothem/VerifyingPaymaster.json new file mode 100644 index 00000000..99f084ba --- /dev/null +++ b/deployments/xdcApothem/VerifyingPaymaster.json @@ -0,0 +1,637 @@ +{ + "address": "0x2b7cBFA523E0D0546C6d1F706b79dB7B6d910bdA", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifyingSigner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newVerifyingSigner", + "type": "address" + } + ], + "name": "VerifyingSignerUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "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" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "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": [ + { + "internalType": "address", + "name": "_newVerifyingSigner", + "type": "address" + } + ], + "name": "updateVerifyingSigner", + "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": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "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": [], + "name": "verifyingSigner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xb461afbbd90ab7f43c1fa9e4d8bb0a70587854a87aa04bef5253599ba53071ca", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0x2b7cBFA523E0D0546C6d1F706b79dB7B6d910bdA", + "transactionIndex": 4, + "gasUsed": "1323356", + "logsBloom": "0x00000000000000000010000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000004000000000004000000000000000000000000000000000000000000000000800000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0b3afb7e098c47b4015dde8d2a7a84c7099a934de4ab80fe18f34509ca881b90", + "transactionHash": "0xb461afbbd90ab7f43c1fa9e4d8bb0a70587854a87aa04bef5253599ba53071ca", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 65448404, + "transactionHash": "0xb461afbbd90ab7f43c1fa9e4d8bb0a70587854a87aa04bef5253599ba53071ca", + "address": "0x2b7cBFA523E0D0546C6d1F706b79dB7B6d910bdA", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 26, + "blockHash": "0x0b3afb7e098c47b4015dde8d2a7a84c7099a934de4ab80fe18f34509ca881b90" + } + ], + "blockNumber": 65448404, + "cumulativeGasUsed": "5235196", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567" + ], + "numDeployments": 1, + "solcInputHash": "59f95187e8259e6af2142e5284338606", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifyingSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"VerifyingSignerUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"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\"},{\"internalType\":\"uint256\",\"name\":\"actualUserOpFeePerGas\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"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\":[{\"internalType\":\"address\",\"name\":\"_newVerifyingSigner\",\"type\":\"address\"}],\"name\":\"updateVerifyingSigner\",\"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\":\"bytes32\",\"name\":\"accountGasLimits\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"gasFees\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct PackedUserOperation\",\"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\":[],\"name\":\"verifyingSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"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,uint256)\":{\"params\":{\"actualGasCost\":\"- Actual gas used so far (without this postOp call).\",\"actualUserOpFeePerGas\":\"- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.\",\"context\":\"- The context value returned by validatePaymasterUserOp\",\"mode\":\"- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp().\"}},\"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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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.\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"amount\":\"- Amount to withdraw.\",\"withdrawAddress\":\"- Target to send to.\"}}},\"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.\"},\"deposit()\":{\"notice\":\"Add a deposit for this paymaster, used for paying for transaction fees.\"},\"getDeposit()\":{\"notice\":\"Return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraw value from the deposit.\"}},\"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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":\"VerifyingPaymaster\"},\"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 v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(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 uint256 localValue = value;\\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] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\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 }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\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, bytes32(signature.length));\\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\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 function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\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, s);\\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, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"account-abstraction/contracts/core/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IPaymaster.sol\\\";\\nimport \\\"../interfaces/IEntryPoint.sol\\\";\\nimport \\\"./UserOperationLib.sol\\\";\\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\\n\\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\\n _validateEntryPointInterface(_entryPoint);\\n entryPoint = _entryPoint;\\n }\\n\\n //sanity check: make sure this EntryPoint was compiled against the same\\n // IEntryPoint of this paymaster\\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \\\"IEntryPoint interface mismatch\\\");\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n PackedUserOperation 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 /**\\n * Validate a user operation.\\n * @param userOp - The user operation.\\n * @param userOpHash - The hash of the user operation.\\n * @param maxCost - The maximum cost of the user operation.\\n */\\n function _validatePaymasterUserOp(\\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\\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,\\n * it must also implement this method.\\n * @param mode - Enum with the following options:\\n * opSucceeded - User operation succeeded.\\n * opReverted - User op reverted. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) internal virtual {\\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * Add a deposit for this paymaster, used for paying for transaction fees.\\n */\\n function deposit() public payable {\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n /**\\n * Withdraw value from the deposit.\\n * @param withdrawAddress - Target to send to.\\n * @param amount - Amount to withdraw.\\n */\\n function withdrawTo(\\n address payable withdrawAddress,\\n uint256 amount\\n ) public onlyOwner {\\n entryPoint.withdrawTo(withdrawAddress, amount);\\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 /**\\n * Validate the call is made from a valid entrypoint\\n */\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x156dd80127599c02937985a4fe44dd6424e29445af9aae886aff0f1993af43ab\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n\\n /*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * must return this value in case of signature failure, instead of revert.\\n */\\nuint256 constant SIG_VALIDATION_FAILED = 1;\\n\\n\\n/*\\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\\n * return this value on success.\\n */\\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\\n\\n\\n/**\\n * Returned data from validateUserOp.\\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\\n * 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\\n * 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 */\\nstruct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n}\\n\\n/**\\n * Extract sigFailed, validAfter, validUntil.\\n * Also convert zero validUntil to type(uint48).max.\\n * @param validationData - The packed validation data.\\n */\\nfunction _parseValidationData(\\n uint256 validationData\\n) 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/**\\n * Helper to pack the return value for validateUserOp.\\n * @param data - The ValidationData to pack.\\n */\\nfunction _packValidationData(\\n ValidationData memory data\\n) pure returns (uint256) {\\n return\\n uint160(data.aggregator) |\\n (uint256(data.validUntil) << 160) |\\n (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 */\\nfunction _packValidationData(\\n bool sigFailed,\\n uint48 validUntil,\\n uint48 validAfter\\n) pure returns (uint256) {\\n return\\n (sigFailed ? 1 : 0) |\\n (uint256(validUntil) << 160) |\\n (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 (\\\"memory-safe\\\") {\\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\\n/**\\n * The minimum of two numbers.\\n * @param a - First number.\\n * @param b - Second number.\\n */\\n function min(uint256 a, uint256 b) pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\",\"keccak256\":\"0x6247e011a6cb0b263b3aa098822977181674d91b62e5bdfe04c6e66f72da25d6\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/core/UserOperationLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../interfaces/PackedUserOperation.sol\\\";\\nimport {calldataKeccak, min} from \\\"./Helpers.sol\\\";\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\\n /**\\n * Get sender from user operation data.\\n * @param userOp - The user operation data.\\n */\\n function getSender(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {\\n data := calldataload(userOp)\\n }\\n return address(uint160(data));\\n }\\n\\n /**\\n * Relayer/block builder might submit the TX with higher priorityFee,\\n * but the user should not pay above what he signed for.\\n * @param userOp - The user operation data.\\n */\\n function gasPrice(\\n PackedUserOperation calldata userOp\\n ) internal view returns (uint256) {\\n unchecked {\\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\\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 /**\\n * Pack the user operation data into bytes for hashing.\\n * @param userOp - The user operation data.\\n */\\n function encode(\\n PackedUserOperation calldata userOp\\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n bytes32 gasFees = userOp.gasFees;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n accountGasLimits, preVerificationGas, gasFees,\\n hashPaymasterAndData\\n );\\n }\\n\\n function unpackUints(\\n bytes32 packed\\n ) internal pure returns (uint256 high128, uint256 low128) {\\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\\n }\\n\\n //unpack just the high 128-bits from a packed value\\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\\n return uint256(packed) >> 128;\\n }\\n\\n // unpack just the low 128-bits from a packed value\\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\\n return uint128(uint256(packed));\\n }\\n\\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.gasFees);\\n }\\n\\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.gasFees);\\n }\\n\\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackHigh128(userOp.accountGasLimits);\\n }\\n\\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return unpackLow128(userOp.accountGasLimits);\\n }\\n\\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\\n }\\n\\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\\n internal pure returns (uint256) {\\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\\n }\\n\\n function unpackPaymasterStaticFields(\\n bytes calldata paymasterAndData\\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\\n return (\\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\\n );\\n }\\n\\n /**\\n * Hash the user operation data.\\n * @param userOp - The user operation data.\\n */\\n function hash(\\n PackedUserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return keccak256(encode(userOp));\\n }\\n}\\n\",\"keccak256\":\"0x9d50ece985d35f82e33e5da417595c86fac10449e3d10895d08363d33aad454b\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n /**\\n * Validate aggregated signature.\\n * Revert if the aggregated signature does not match the given list of operations.\\n * @param userOps - Array of UserOperations to validate the signature for.\\n * @param signature - The aggregated signature.\\n */\\n function validateSignatures(\\n PackedUserOperation[] calldata userOps,\\n bytes calldata signature\\n ) external view;\\n\\n /**\\n * Validate signature of a single userOp.\\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\\n * the aggregator this account uses.\\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(\\n PackedUserOperation 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(\\n PackedUserOperation[] calldata userOps\\n ) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588\",\"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.7.5;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./PackedUserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\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,\\n * validation and execution).\\n */\\n event UserOperationEvent(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address indexed paymaster,\\n uint256 nonce,\\n bool success,\\n uint256 actualGasCost,\\n uint256 actualGasUsed\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n address factory,\\n address paymaster\\n );\\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(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * An event emitted if the UserOperation Paymaster's \\\"postOp\\\" call 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 PostOpRevertReason(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce,\\n bytes revertReason\\n );\\n\\n /**\\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\\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 */\\n event UserOperationPrefundTooLow(\\n bytes32 indexed userOpHash,\\n address indexed sender,\\n uint256 nonce\\n );\\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * A custom revert error of handleOps, to identify the offending op.\\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 * 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. The string starts with a unique code \\\"AAmn\\\",\\n * 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 */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * A custom revert error of handleOps, to report a revert by account or paymaster.\\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\\n * @param reason - Revert reason. see FailedOp(uint256,string), above\\n * @param inner - data from inner cought revert reason\\n * @dev note that inner is truncated to 2048 bytes\\n */\\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\\n\\n error PostOpReverted(bytes returnData);\\n\\n /**\\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\\n * @param aggregator The aggregator that failed to verify the signature\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n // Return value of getSenderAddress.\\n error SenderAddressResult(address sender);\\n\\n // UserOps handled, per aggregator.\\n struct UserOpsPerAggregator {\\n PackedUserOperation[] userOps;\\n // Aggregator address\\n IAggregator aggregator;\\n // Aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperations.\\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(\\n PackedUserOperation[] calldata ops,\\n address payable beneficiary\\n ) 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 * @param userOp - The user operation to generate the request ID for.\\n * @return hash the hash of this UserOperation\\n */\\n function getUserOpHash(\\n PackedUserOperation calldata userOp\\n ) external view returns (bytes32);\\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 accountValidationData - returned validationData from account.\\n * @param paymasterValidationData - return validationData from paymaster.\\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n uint256 accountValidationData;\\n uint256 paymasterValidationData;\\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 error DelegateAndRevert(bool success, bytes ret);\\n\\n /**\\n * Helper method for dry-run testing.\\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\\n * actual EntryPoint code is less convenient.\\n * @param target a target contract to make a delegatecall from entrypoint\\n * @param data data to pass to target in a delegatecall\\n */\\n function delegateAndRevert(address target, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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\":\"0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./PackedUserOperation.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 enum PostOpMode {\\n // User op succeeded.\\n opSucceeded,\\n // User op reverted. Still has to pay for gas.\\n opReverted,\\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\\n postOpReverted\\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. Zero length to signify postOp is not required.\\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\\n * value of validateUserOperation.\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * other values are invalid for paymaster.\\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(\\n PackedUserOperation calldata userOp,\\n bytes32 userOpHash,\\n 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. The paymaster still has to pay for gas.\\n * postOpReverted - never passed in a call to postOp().\\n * @param context - The context value returned by validatePaymasterUserOp\\n * @param actualGasCost - Actual gas used so far (without this postOp call).\\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\\n * and maxPriorityFee (and basefee)\\n * It is not the same as tx.gasprice, which is what the bundler pays.\\n */\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost,\\n uint256 actualUserOpFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0x49d8dbf8a85b006bcd89bbc40e4e9e113997cc016007de85263bdae70572d07f\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity >=0.7.5;\\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 event Deposited(address indexed account, uint256 totalDeposit);\\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(address indexed account, uint256 withdrawTime);\\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 fits into one cell (used during handleOp)\\n * and the rest fit into a 2nd cell (used during stake/unstake)\\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 uint256 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 /**\\n * Get deposit info.\\n * @param account - The account to query.\\n * @return info - Full deposit information of given account.\\n */\\n function getDepositInfo(\\n address account\\n ) external view returns (DepositInfo memory info);\\n\\n /**\\n * Get account balance.\\n * @param account - The account to query.\\n * @return - The deposit (for gas payment) of the account.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * Add to the deposit of the given account.\\n * @param account - The account to add to.\\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(\\n address payable withdrawAddress,\\n uint256 withdrawAmount\\n ) external;\\n}\\n\",\"keccak256\":\"0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/PackedUserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.7.5;\\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\\n * Covers batch overhead.\\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\\n * 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 */\\nstruct PackedUserOperation {\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n bytes32 accountGasLimits;\\n uint256 preVerificationGas;\\n bytes32 gasFees;\\n bytes paymasterAndData;\\n bytes signature;\\n}\\n\",\"keccak256\":\"0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359\",\"license\":\"GPL-3.0\"},\"src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.23;\\n\\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\\n\\n/* solhint-disable reason-string */\\n/* solhint-disable no-inline-assembly */\\n\\nimport \\\"../../../account-abstraction/contracts/core/BasePaymaster.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/UserOperationLib.sol\\\";\\nimport \\\"../../../account-abstraction/contracts/core/Helpers.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\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 the account-specific signature:\\n * - the paymaster checks a signature to agree to PAY for GAS.\\n * - the account checks a signature to prove identity and account ownership.\\n */\\ncontract VerifyingPaymaster is BasePaymaster {\\n using UserOperationLib for PackedUserOperation;\\n\\n address public verifyingSigner;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\\n\\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\\n\\n event VerifyingSignerUpdated(address newVerifyingSigner);\\n\\n constructor(\\n IEntryPoint _entryPoint,\\n address _verifyingSigner\\n ) BasePaymaster(_entryPoint) {\\n verifyingSigner = _verifyingSigner;\\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 PackedUserOperation 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 address sender = userOp.getSender();\\n return\\n keccak256(\\n abi.encode(\\n sender,\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.accountGasLimits,\\n uint256(\\n bytes32(\\n userOp\\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\\n )\\n ),\\n userOp.preVerificationGas,\\n userOp.gasFees,\\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 PackedUserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n )\\n internal\\n view\\n override\\n returns (bytes memory context, uint256 validationData)\\n {\\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 \\\"VerifyingPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"VerifyingPaymaster: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n\\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\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 (\\\"\\\", _packValidationData(false, validUntil, validAfter));\\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:],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function updateVerifyingSigner(\\n address _newVerifyingSigner\\n ) public onlyOwner {\\n verifyingSigner = _newVerifyingSigner;\\n emit VerifyingSignerUpdated(_newVerifyingSigner);\\n }\\n}\\n\",\"keccak256\":\"0xf68e2030a9a063ed25d756795a70c02ccfa99925e1bcd34d93b6a9765ffdace5\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001417380380620014178339810160408190526200003491620001ca565b8133806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620000a1565b506200007481620000f1565b6001600160a01b03908116608052600180546001600160a01b031916929091169190911790555062000234565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000163919062000209565b620001b15760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b6001600160a01b0381168114620001b157600080fd5b60008060408385031215620001de57600080fd5b8251620001eb81620001b4565b6020840151909250620001fe81620001b4565b809150509250929050565b6000602082840312156200021c57600080fd5b815180151581146200022d57600080fd5b9392505050565b608051611196620002816000396000818161027b01528181610331015281816103c80152818161061e015281816106b801528181610728015281816107b5015261087d01526111966000f3fe6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106100f35760003560e01c806393b941211161008a578063c23a5cea11610059578063c23a5cea146102b2578063c399ec88146102d2578063d0e30db0146102e7578063f2fde38b146102ef57600080fd5b806393b941211461021957806394d4ad6014610239578063b0d691fe14610269578063bb9fe6bf1461029d57600080fd5b80635829c5f5116100c65780635829c5f514610198578063715018a6146101c65780637c627b21146101db5780638da5cb5b146101fb57600080fd5b80630396cb60146100f8578063205c28781461010d57806323d9ac9b1461012d57806352b7512c1461016a575b600080fd5b61010b610106366004610d3c565b61030f565b005b34801561011957600080fd5b5061010b610128366004610d7e565b61039a565b34801561013957600080fd5b5060015461014d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017657600080fd5b5061018a610185366004610dc3565b61040c565b604051610161929190610e11565b3480156101a457600080fd5b506101b86101b3366004610e81565b610430565b604051908152602001610161565b3480156101d257600080fd5b5061010b610540565b3480156101e757600080fd5b5061010b6101f6366004610f28565b610554565b34801561020757600080fd5b506000546001600160a01b031661014d565b34801561022557600080fd5b5061010b610234366004610f93565b610570565b34801561024557600080fd5b50610259610254366004610fb0565b6105cc565b6040516101619493929190610ff2565b34801561027557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102a957600080fd5b5061010b610614565b3480156102be57600080fd5b5061010b6102cd366004610f93565b610691565b3480156102de57600080fd5b506101b8610710565b61010b6107a0565b3480156102fb57600080fd5b5061010b61030a366004610f93565b610802565b610317610845565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050505050565b6103a2610845565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561037e57600080fd5b60606000610418610872565b6104238585856108e2565b915091505b935093915050565b60008335806020860135610447604088018861103e565b604051610455929190611085565b60405190819003902061046b606089018961103e565b604051610479929190611085565b604051908190039020608089013561049460e08b018b61103e565b6104a391603491601491611095565b6104ac916110bf565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b610548610845565b6105526000610a77565b565b61055c610872565b6105698585858585610ac7565b5050505050565b610578610845565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f51d754ac8f7adf515a023f2c423e01ef97817c1af33cb63b36f1fe12fde2d91a9060200160405180910390a150565b60008036816105de8560348189611095565b8101906105eb91906110dd565b909450925085856105fe60346040611110565b610609928290611095565b949793965094505050565b61061c610845565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561067757600080fd5b505af115801561068b573d6000803e3d6000fd5b50505050565b610699610845565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b1580156106fc57600080fd5b505af1158015610569573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190611131565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156106fc57600080fd5b61080a610845565b6001600160a01b03811661083957604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61084281610a77565b50565b6000546001600160a01b031633146105525760405163118cdaa760e01b8152336004820152602401610830565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105525760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610830565b60606000808036816108fa61025460e08b018b61103e565b9296509094509250905060408114806109135750604181145b610987576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e64446174616064820152608401610830565b60006109ca6109978b8787610430565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050610a0c8184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aff92505050565b6001546001600160a01b03908116911614610a4c57610a2d60018686610b2b565b6040518060200160405280600081525090965096505050505050610428565b610a5860008686610b2b565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b6044820152606401610830565b600080600080610b0f8686610b63565b925092509250610b1f8282610bb0565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b53576000610b56565b60015b60ff161717949350505050565b60008060008351604103610b9d5760208401516040850151606086015160001a610b8f88828585610c6d565b955095509550505050610ba9565b50508151600091506002905b9250925092565b6000826003811115610bc457610bc461114a565b03610bcd575050565b6001826003811115610be157610be161114a565b03610bff5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610c1357610c1361114a565b03610c345760405163fce698f760e01b815260048101829052602401610830565b6003826003811115610c4857610c4861114a565b03610c69576040516335e2f38360e21b815260048101829052602401610830565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ca85750600091506003905082610d32565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2857506000925060019150829050610d32565b9250600091508190505b9450945094915050565b600060208284031215610d4e57600080fd5b813563ffffffff81168114610d6257600080fd5b9392505050565b6001600160a01b038116811461084257600080fd5b60008060408385031215610d9157600080fd5b8235610d9c81610d69565b946020939093013593505050565b60006101208284031215610dbd57600080fd5b50919050565b600080600060608486031215610dd857600080fd5b833567ffffffffffffffff811115610def57600080fd5b610dfb86828701610daa565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610e3f5760208187018101516060868401015201610e22565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e7c57600080fd5b919050565b600080600060608486031215610e9657600080fd5b833567ffffffffffffffff811115610ead57600080fd5b610eb986828701610daa565b935050610ec860208501610e66565b9150610ed660408501610e66565b90509250925092565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600060808688031215610f4057600080fd5b853560038110610f4f57600080fd5b9450602086013567ffffffffffffffff811115610f6b57600080fd5b610f7788828901610edf565b9699909850959660408101359660609091013595509350505050565b600060208284031215610fa557600080fd5b8135610d6281610d69565b60008060208385031215610fc357600080fd5b823567ffffffffffffffff811115610fda57600080fd5b610fe685828601610edf565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000808335601e1984360301811261105557600080fd5b83018035915067ffffffffffffffff82111561107057600080fd5b602001915036819003821315610f2157600080fd5b8183823760009101908152919050565b600080858511156110a557600080fd5b838611156110b257600080fd5b5050820193919092039150565b80356020831015610b2557600019602084900360031b1b1692915050565b600080604083850312156110f057600080fd5b6110f983610e66565b915061110760208401610e66565b90509250929050565b80820180821115610b2557634e487b7160e01b600052601160045260246000fd5b60006020828403121561114357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b3dee56d54c33e3d801b74ef60dfdbf85dc7548b852fda6106bd54223fbdaf2e64736f6c63430008170033", + "devdoc": { + "errors": { + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "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,uint256)": { + "params": { + "actualGasCost": "- Actual gas used so far (without this postOp call).", + "actualUserOpFeePerGas": "- the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas and maxPriorityFee (and basefee) It is not the same as tx.gasprice, which is what the bundler pays.", + "context": "- The context value returned by validatePaymasterUserOp", + "mode": "- Enum with the following options: opSucceeded - User operation succeeded. opReverted - User op reverted. The paymaster still has to pay for gas. postOpReverted - never passed in a call to postOp()." + } + }, + "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,bytes32,uint256,bytes32,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, other values are invalid for paymaster. <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." + } + }, + "withdrawTo(address,uint256)": { + "params": { + "amount": "- Amount to withdraw.", + "withdrawAddress": "- Target to send to." + } + } + }, + "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." + }, + "deposit()": { + "notice": "Add a deposit for this paymaster, used for paying for transaction fees." + }, + "getDeposit()": { + "notice": "Return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,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,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,bytes32,uint256,bytes32,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)" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraw value from the deposit." + } + }, + "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 the account-specific signature: - the paymaster checks a signature to agree to PAY for GAS. - the account checks a signature to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 51905, + "contract": "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol:VerifyingPaymaster", + "label": "verifyingSigner", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/xdcApothem/solcInputs/59f95187e8259e6af2142e5284338606.json b/deployments/xdcApothem/solcInputs/59f95187e8259e6af2142e5284338606.json new file mode 100644 index 00000000..940de04b --- /dev/null +++ b/deployments/xdcApothem/solcInputs/59f95187e8259e6af2142e5284338606.json @@ -0,0 +1,285 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../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 * The initial owner is set to the address provided by the deployer. This can\n * 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 /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\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 if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\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 if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n * ```\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\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 }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile 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 {MessageHashUtils-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 function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\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, bytes32(signature.length));\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 precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\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 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\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 function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\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, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\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, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\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 towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\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\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\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.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\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\n // works 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 (unsignedRoundsUp(rounding) && 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\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n _status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\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), HEX_DIGITS))\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 toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(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 uint256 localValue = value;\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] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\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\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "account-abstraction/contracts/core/BasePaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable reason-string */\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"./UserOperationLib.sol\";\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 uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET;\n uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET;\n uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET;\n\n constructor(IEntryPoint _entryPoint) Ownable(msg.sender) {\n _validateEntryPointInterface(_entryPoint);\n entryPoint = _entryPoint;\n }\n\n //sanity check: make sure this EntryPoint was compiled against the same\n // IEntryPoint of this paymaster\n function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual {\n require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), \"IEntryPoint interface mismatch\");\n }\n\n /// @inheritdoc IPaymaster\n function validatePaymasterUserOp(\n PackedUserOperation 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 /**\n * Validate a user operation.\n * @param userOp - The user operation.\n * @param userOpHash - The hash of the user operation.\n * @param maxCost - The maximum cost of the user operation.\n */\n function _validatePaymasterUserOp(\n PackedUserOperation 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 uint256 actualUserOpFeePerGas\n ) external override {\n _requireFromEntryPoint();\n _postOp(mode, context, actualGasCost, actualUserOpFeePerGas);\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,\n * it must also implement this method.\n * @param mode - Enum with the following options:\n * opSucceeded - User operation succeeded.\n * opReverted - User op reverted. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function _postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) internal virtual {\n (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params\n // subclass must override this method if validatePaymasterUserOp returns a context\n revert(\"must override\");\n }\n\n /**\n * Add a deposit for this paymaster, used for paying for transaction fees.\n */\n function deposit() public payable {\n entryPoint.depositTo{value: msg.value}(address(this));\n }\n\n /**\n * Withdraw value from the deposit.\n * @param withdrawAddress - Target to send to.\n * @param amount - Amount to withdraw.\n */\n function withdrawTo(\n address payable withdrawAddress,\n uint256 amount\n ) public onlyOwner {\n entryPoint.withdrawTo(withdrawAddress, amount);\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 /**\n * Validate the call is made from a valid entrypoint\n */\n function _requireFromEntryPoint() internal virtual {\n require(msg.sender == address(entryPoint), \"Sender not EntryPoint\");\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IAccountExecute.sol\";\nimport \"../interfaces/IPaymaster.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\n\nimport \"../utils/Exec.sol\";\nimport \"./StakeManager.sol\";\nimport \"./SenderCreator.sol\";\nimport \"./Helpers.sol\";\nimport \"./NonceManager.sol\";\nimport \"./UserOperationLib.sol\";\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n/*\n * Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n * Only one instance required on each chain.\n */\n\n/// @custom:security-contact https://bounty.ethereum.org\ncontract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {\n\n using UserOperationLib for PackedUserOperation;\n\n SenderCreator private immutable _senderCreator = new SenderCreator();\n\n function senderCreator() internal view virtual returns (SenderCreator) {\n return _senderCreator;\n }\n\n //compensate for innerHandleOps' emit message and deposit refund.\n // allow some slack for future gas price changes.\n uint256 private constant INNER_GAS_OVERHEAD = 10000;\n\n // Marker for inner call revert on out of gas\n bytes32 private constant INNER_OUT_OF_GAS = hex\"deaddead\";\n bytes32 private constant INNER_REVERT_LOW_PREFUND = hex\"deadaa51\";\n\n uint256 private constant REVERT_REASON_MAX_LEN = 2048;\n uint256 private constant PENALTY_PERCENT = 10;\n\n /// @inheritdoc IERC165\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // note: solidity \"type(IEntryPoint).interfaceId\" is without inherited methods but we want to check everything\n return interfaceId == (type(IEntryPoint).interfaceId ^ type(IStakeManager).interfaceId ^ type(INonceManager).interfaceId) ||\n interfaceId == type(IEntryPoint).interfaceId ||\n interfaceId == type(IStakeManager).interfaceId ||\n interfaceId == type(INonceManager).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * Compensate the caller's beneficiary address with the collected fees of all UserOperations.\n * @param beneficiary - The address to receive the fees.\n * @param amount - Amount to transfer.\n */\n function _compensate(address payable beneficiary, uint256 amount) internal {\n require(beneficiary != address(0), \"AA90 invalid beneficiary\");\n (bool success, ) = beneficiary.call{value: amount}(\"\");\n require(success, \"AA91 failed send to beneficiary\");\n }\n\n /**\n * Execute a user operation.\n * @param opIndex - Index into the opInfo array.\n * @param userOp - The userOp to execute.\n * @param opInfo - The opInfo filled by validatePrepayment for this userOp.\n * @return collected - The total amount this userOp paid.\n */\n function _executeUserOp(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory opInfo\n )\n internal\n returns\n (uint256 collected) {\n uint256 preGas = gasleft();\n bytes memory context = getMemoryBytesFromOffset(opInfo.contextOffset);\n bool success;\n {\n uint256 saveFreePtr;\n assembly (\"memory-safe\") {\n saveFreePtr := mload(0x40)\n }\n bytes calldata callData = userOp.callData;\n bytes memory innerCall;\n bytes4 methodSig;\n assembly {\n let len := callData.length\n if gt(len, 3) {\n methodSig := calldataload(callData.offset)\n }\n }\n if (methodSig == IAccountExecute.executeUserOp.selector) {\n bytes memory executeUserOp = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, opInfo.userOpHash));\n innerCall = abi.encodeCall(this.innerHandleOp, (executeUserOp, opInfo, context));\n } else\n {\n innerCall = abi.encodeCall(this.innerHandleOp, (callData, opInfo, context));\n }\n assembly (\"memory-safe\") {\n success := call(gas(), address(), 0, add(innerCall, 0x20), mload(innerCall), 0, 32)\n collected := mload(0)\n mstore(0x40, saveFreePtr)\n }\n }\n if (!success) {\n bytes32 innerRevertCode;\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if eq(32,len) {\n returndatacopy(0, 0, 32)\n innerRevertCode := mload(0)\n }\n }\n if (innerRevertCode == INNER_OUT_OF_GAS) {\n // handleOps was called with gas limit too low. abort entire bundle.\n //can only be caused by bundler (leaving not enough gas for inner call)\n revert FailedOp(opIndex, \"AA95 out of gas\");\n } else if (innerRevertCode == INNER_REVERT_LOW_PREFUND) {\n // innerCall reverted on prefund too low. treat entire prefund as \"gas cost\"\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n uint256 actualGasCost = opInfo.prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n collected = actualGasCost;\n } else {\n emit PostOpRevertReason(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce,\n Exec.getReturnData(REVERT_REASON_MAX_LEN)\n );\n\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n collected = _postExecution(\n IPaymaster.PostOpMode.postOpReverted,\n opInfo,\n context,\n actualGas\n );\n }\n }\n }\n\n function emitUserOperationEvent(UserOpInfo memory opInfo, bool success, uint256 actualGasCost, uint256 actualGas) internal virtual {\n emit UserOperationEvent(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.paymaster,\n opInfo.mUserOp.nonce,\n success,\n actualGasCost,\n actualGas\n );\n }\n\n function emitPrefundTooLow(UserOpInfo memory opInfo) internal virtual {\n emit UserOperationPrefundTooLow(\n opInfo.userOpHash,\n opInfo.mUserOp.sender,\n opInfo.mUserOp.nonce\n );\n }\n\n /// @inheritdoc IEntryPoint\n function handleOps(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) public nonReentrant {\n uint256 opslen = ops.length;\n UserOpInfo[] memory opInfos = new UserOpInfo[](opslen);\n\n unchecked {\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[i];\n (\n uint256 validationData,\n uint256 pmValidationData\n ) = _validatePrepayment(i, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n pmValidationData,\n address(0)\n );\n }\n\n uint256 collected = 0;\n emit BeforeExecution();\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(i, ops[i], opInfos[i]);\n }\n\n _compensate(beneficiary, collected);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function handleAggregatedOps(\n UserOpsPerAggregator[] calldata opsPerAggregator,\n address payable beneficiary\n ) public nonReentrant {\n\n uint256 opasLen = opsPerAggregator.length;\n uint256 totalOps = 0;\n for (uint256 i = 0; i < opasLen; i++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[i];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n //address(1) is special marker of \"signature error\"\n require(\n address(aggregator) != address(1),\n \"AA96 invalid aggregator\"\n );\n\n if (address(aggregator) != address(0)) {\n // solhint-disable-next-line no-empty-blocks\n try aggregator.validateSignatures(ops, opa.signature) {} catch {\n revert SignatureValidationFailed(address(aggregator));\n }\n }\n\n totalOps += ops.length;\n }\n\n UserOpInfo[] memory opInfos = new UserOpInfo[](totalOps);\n\n uint256 opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n PackedUserOperation[] calldata ops = opa.userOps;\n IAggregator aggregator = opa.aggregator;\n\n uint256 opslen = ops.length;\n for (uint256 i = 0; i < opslen; i++) {\n UserOpInfo memory opInfo = opInfos[opIndex];\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(opIndex, ops[i], opInfo);\n _validateAccountAndPaymasterValidationData(\n i,\n validationData,\n paymasterValidationData,\n address(aggregator)\n );\n opIndex++;\n }\n }\n\n emit BeforeExecution();\n\n uint256 collected = 0;\n opIndex = 0;\n for (uint256 a = 0; a < opasLen; a++) {\n UserOpsPerAggregator calldata opa = opsPerAggregator[a];\n emit SignatureAggregatorChanged(address(opa.aggregator));\n PackedUserOperation[] calldata ops = opa.userOps;\n uint256 opslen = ops.length;\n\n for (uint256 i = 0; i < opslen; i++) {\n collected += _executeUserOp(opIndex, ops[i], opInfos[opIndex]);\n opIndex++;\n }\n }\n emit SignatureAggregatorChanged(address(0));\n\n _compensate(beneficiary, collected);\n }\n\n /**\n * A memory copy of UserOp static fields only.\n * Excluding: callData, initCode and signature. Replacing paymasterAndData with paymaster.\n */\n struct MemoryUserOp {\n address sender;\n uint256 nonce;\n uint256 verificationGasLimit;\n uint256 callGasLimit;\n uint256 paymasterVerificationGasLimit;\n uint256 paymasterPostOpGasLimit;\n uint256 preVerificationGas;\n address paymaster;\n uint256 maxFeePerGas;\n uint256 maxPriorityFeePerGas;\n }\n\n struct UserOpInfo {\n MemoryUserOp mUserOp;\n bytes32 userOpHash;\n uint256 prefund;\n uint256 contextOffset;\n uint256 preOpGas;\n }\n\n /**\n * Inner function to handle a UserOperation.\n * Must be declared \"external\" to open a call context, but it can only be called by handleOps.\n * @param callData - The callData to execute.\n * @param opInfo - The UserOpInfo struct.\n * @param context - The context bytes.\n * @return actualGasCost - the actual cost in eth this UserOperation paid for gas\n */\n function innerHandleOp(\n bytes memory callData,\n UserOpInfo memory opInfo,\n bytes calldata context\n ) external returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n require(msg.sender == address(this), \"AA92 internal call only\");\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n\n uint256 callGasLimit = mUserOp.callGasLimit;\n unchecked {\n // handleOps was called with gas limit too low. abort entire bundle.\n if (\n gasleft() * 63 / 64 <\n callGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n INNER_GAS_OVERHEAD\n ) {\n assembly (\"memory-safe\") {\n mstore(0, INNER_OUT_OF_GAS)\n revert(0, 32)\n }\n }\n }\n\n IPaymaster.PostOpMode mode = IPaymaster.PostOpMode.opSucceeded;\n if (callData.length > 0) {\n bool success = Exec.call(mUserOp.sender, 0, callData, callGasLimit);\n if (!success) {\n bytes memory result = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n if (result.length > 0) {\n emit UserOperationRevertReason(\n opInfo.userOpHash,\n mUserOp.sender,\n mUserOp.nonce,\n result\n );\n }\n mode = IPaymaster.PostOpMode.opReverted;\n }\n }\n\n unchecked {\n uint256 actualGas = preGas - gasleft() + opInfo.preOpGas;\n return _postExecution(mode, opInfo, context, actualGas);\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) public view returns (bytes32) {\n return\n keccak256(abi.encode(userOp.hash(), address(this), block.chainid));\n }\n\n /**\n * Copy general fields from userOp into the memory opInfo structure.\n * @param userOp - The user operation.\n * @param mUserOp - The memory user operation.\n */\n function _copyUserOpToMemory(\n PackedUserOperation calldata userOp,\n MemoryUserOp memory mUserOp\n ) internal pure {\n mUserOp.sender = userOp.sender;\n mUserOp.nonce = userOp.nonce;\n (mUserOp.verificationGasLimit, mUserOp.callGasLimit) = UserOperationLib.unpackUints(userOp.accountGasLimits);\n mUserOp.preVerificationGas = userOp.preVerificationGas;\n (mUserOp.maxPriorityFeePerGas, mUserOp.maxFeePerGas) = UserOperationLib.unpackUints(userOp.gasFees);\n bytes calldata paymasterAndData = userOp.paymasterAndData;\n if (paymasterAndData.length > 0) {\n require(\n paymasterAndData.length >= UserOperationLib.PAYMASTER_DATA_OFFSET,\n \"AA93 invalid paymasterAndData\"\n );\n (mUserOp.paymaster, mUserOp.paymasterVerificationGasLimit, mUserOp.paymasterPostOpGasLimit) = UserOperationLib.unpackPaymasterStaticFields(paymasterAndData);\n } else {\n mUserOp.paymaster = address(0);\n mUserOp.paymasterVerificationGasLimit = 0;\n mUserOp.paymasterPostOpGasLimit = 0;\n }\n }\n\n /**\n * Get the required prefunded gas fee amount for an operation.\n * @param mUserOp - The user operation in memory.\n */\n function _getRequiredPrefund(\n MemoryUserOp memory mUserOp\n ) internal pure returns (uint256 requiredPrefund) {\n unchecked {\n uint256 requiredGas = mUserOp.verificationGasLimit +\n mUserOp.callGasLimit +\n mUserOp.paymasterVerificationGasLimit +\n mUserOp.paymasterPostOpGasLimit +\n mUserOp.preVerificationGas;\n\n requiredPrefund = requiredGas * mUserOp.maxFeePerGas;\n }\n }\n\n /**\n * Create sender smart contract account if init code is provided.\n * @param opIndex - The operation index.\n * @param opInfo - The operation info.\n * @param initCode - The init code for the smart contract account.\n */\n function _createSenderIfNeeded(\n uint256 opIndex,\n UserOpInfo memory opInfo,\n bytes calldata initCode\n ) internal {\n if (initCode.length != 0) {\n address sender = opInfo.mUserOp.sender;\n if (sender.code.length != 0)\n revert FailedOp(opIndex, \"AA10 sender already constructed\");\n address sender1 = senderCreator().createSender{\n gas: opInfo.mUserOp.verificationGasLimit\n }(initCode);\n if (sender1 == address(0))\n revert FailedOp(opIndex, \"AA13 initCode failed or OOG\");\n if (sender1 != sender)\n revert FailedOp(opIndex, \"AA14 initCode must return sender\");\n if (sender1.code.length == 0)\n revert FailedOp(opIndex, \"AA15 initCode must create sender\");\n address factory = address(bytes20(initCode[0:20]));\n emit AccountDeployed(\n opInfo.userOpHash,\n sender,\n factory,\n opInfo.mUserOp.paymaster\n );\n }\n }\n\n /// @inheritdoc IEntryPoint\n function getSenderAddress(bytes calldata initCode) public {\n address sender = senderCreator().createSender(initCode);\n revert SenderAddressResult(sender);\n }\n\n /**\n * Call account.validateUserOp.\n * Revert (with FailedOp) in case validateUserOp reverts, or account didn't send required prefund.\n * Decrement account's deposit if needed.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPrefund - The required prefund amount.\n */\n function _validateAccountPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPrefund,\n uint256 verificationGasLimit\n )\n internal\n returns (\n uint256 validationData\n )\n {\n unchecked {\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address sender = mUserOp.sender;\n _createSenderIfNeeded(opIndex, opInfo, op.initCode);\n address paymaster = mUserOp.paymaster;\n uint256 missingAccountFunds = 0;\n if (paymaster == address(0)) {\n uint256 bal = balanceOf(sender);\n missingAccountFunds = bal > requiredPrefund\n ? 0\n : requiredPrefund - bal;\n }\n try\n IAccount(sender).validateUserOp{\n gas: verificationGasLimit\n }(op, opInfo.userOpHash, missingAccountFunds)\n returns (uint256 _validationData) {\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA23 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (paymaster == address(0)) {\n DepositInfo storage senderInfo = deposits[sender];\n uint256 deposit = senderInfo.deposit;\n if (requiredPrefund > deposit) {\n revert FailedOp(opIndex, \"AA21 didn't pay prefund\");\n }\n senderInfo.deposit = deposit - requiredPrefund;\n }\n }\n }\n\n /**\n * In case the request has a paymaster:\n * - Validate paymaster has enough deposit.\n * - Call paymaster.validatePaymasterUserOp.\n * - Revert with proper FailedOp in case paymaster reverts.\n * - Decrement paymaster's deposit.\n * @param opIndex - The operation index.\n * @param op - The user operation.\n * @param opInfo - The operation info.\n * @param requiredPreFund - The required prefund amount.\n */\n function _validatePaymasterPrepayment(\n uint256 opIndex,\n PackedUserOperation calldata op,\n UserOpInfo memory opInfo,\n uint256 requiredPreFund\n ) internal returns (bytes memory context, uint256 validationData) {\n unchecked {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n address paymaster = mUserOp.paymaster;\n DepositInfo storage paymasterInfo = deposits[paymaster];\n uint256 deposit = paymasterInfo.deposit;\n if (deposit < requiredPreFund) {\n revert FailedOp(opIndex, \"AA31 paymaster deposit too low\");\n }\n paymasterInfo.deposit = deposit - requiredPreFund;\n uint256 pmVerificationGasLimit = mUserOp.paymasterVerificationGasLimit;\n try\n IPaymaster(paymaster).validatePaymasterUserOp{gas: pmVerificationGasLimit}(\n op,\n opInfo.userOpHash,\n requiredPreFund\n )\n returns (bytes memory _context, uint256 _validationData) {\n context = _context;\n validationData = _validationData;\n } catch {\n revert FailedOpWithRevert(opIndex, \"AA33 reverted\", Exec.getReturnData(REVERT_REASON_MAX_LEN));\n }\n if (preGas - gasleft() > pmVerificationGasLimit) {\n revert FailedOp(opIndex, \"AA36 over paymasterVerificationGasLimit\");\n }\n }\n }\n\n /**\n * Revert if either account validationData or paymaster validationData is expired.\n * @param opIndex - The operation index.\n * @param validationData - The account validationData.\n * @param paymasterValidationData - The paymaster validationData.\n * @param expectedAggregator - The expected aggregator.\n */\n function _validateAccountAndPaymasterValidationData(\n uint256 opIndex,\n uint256 validationData,\n uint256 paymasterValidationData,\n address expectedAggregator\n ) internal view {\n (address aggregator, bool outOfTimeRange) = _getValidationData(\n validationData\n );\n if (expectedAggregator != aggregator) {\n revert FailedOp(opIndex, \"AA24 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA22 expired or not due\");\n }\n // pmAggregator is not a real signature aggregator: we don't have logic to handle it as address.\n // Non-zero address means that the paymaster fails due to some signature check (which is ok only during estimation).\n address pmAggregator;\n (pmAggregator, outOfTimeRange) = _getValidationData(\n paymasterValidationData\n );\n if (pmAggregator != address(0)) {\n revert FailedOp(opIndex, \"AA34 signature error\");\n }\n if (outOfTimeRange) {\n revert FailedOp(opIndex, \"AA32 paymaster expired or not due\");\n }\n }\n\n /**\n * Parse validationData into its components.\n * @param validationData - The packed validation data (sigFailed, validAfter, validUntil).\n * @return aggregator the aggregator of the validationData\n * @return outOfTimeRange true if current time is outside the time range of this validationData.\n */\n function _getValidationData(\n uint256 validationData\n ) internal view returns (address aggregator, bool outOfTimeRange) {\n if (validationData == 0) {\n return (address(0), false);\n }\n ValidationData memory data = _parseValidationData(validationData);\n // solhint-disable-next-line not-rely-on-time\n outOfTimeRange = block.timestamp > data.validUntil || block.timestamp < data.validAfter;\n aggregator = data.aggregator;\n }\n\n /**\n * Validate account and paymaster (if defined) and\n * also make sure total validation doesn't exceed verificationGasLimit.\n * This method is called off-chain (simulateValidation()) and on-chain (from handleOps)\n * @param opIndex - The index of this userOp into the \"opInfos\" array.\n * @param userOp - The userOp to validate.\n */\n function _validatePrepayment(\n uint256 opIndex,\n PackedUserOperation calldata userOp,\n UserOpInfo memory outOpInfo\n )\n internal\n returns (uint256 validationData, uint256 paymasterValidationData)\n {\n uint256 preGas = gasleft();\n MemoryUserOp memory mUserOp = outOpInfo.mUserOp;\n _copyUserOpToMemory(userOp, mUserOp);\n outOpInfo.userOpHash = getUserOpHash(userOp);\n\n // Validate all numeric values in userOp are well below 128 bit, so they can safely be added\n // and multiplied without causing overflow.\n uint256 verificationGasLimit = mUserOp.verificationGasLimit;\n uint256 maxGasValues = mUserOp.preVerificationGas |\n verificationGasLimit |\n mUserOp.callGasLimit |\n mUserOp.paymasterVerificationGasLimit |\n mUserOp.paymasterPostOpGasLimit |\n mUserOp.maxFeePerGas |\n mUserOp.maxPriorityFeePerGas;\n require(maxGasValues <= type(uint120).max, \"AA94 gas values overflow\");\n\n uint256 requiredPreFund = _getRequiredPrefund(mUserOp);\n validationData = _validateAccountPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund,\n verificationGasLimit\n );\n\n if (!_validateAndUpdateNonce(mUserOp.sender, mUserOp.nonce)) {\n revert FailedOp(opIndex, \"AA25 invalid account nonce\");\n }\n\n unchecked {\n if (preGas - gasleft() > verificationGasLimit) {\n revert FailedOp(opIndex, \"AA26 over verificationGasLimit\");\n }\n }\n\n bytes memory context;\n if (mUserOp.paymaster != address(0)) {\n (context, paymasterValidationData) = _validatePaymasterPrepayment(\n opIndex,\n userOp,\n outOpInfo,\n requiredPreFund\n );\n }\n unchecked {\n outOpInfo.prefund = requiredPreFund;\n outOpInfo.contextOffset = getOffsetOfMemoryBytes(context);\n outOpInfo.preOpGas = preGas - gasleft() + userOp.preVerificationGas;\n }\n }\n\n /**\n * Process post-operation, called just after the callData is executed.\n * If a paymaster is defined and its validation returned a non-empty context, its postOp is called.\n * The excess amount is refunded to the account (or paymaster - if it was used in the request).\n * @param mode - Whether is called from innerHandleOp, or outside (postOpReverted).\n * @param opInfo - UserOp fields and info collected during validation.\n * @param context - The context returned in validatePaymasterUserOp.\n * @param actualGas - The gas used so far by this user operation.\n */\n function _postExecution(\n IPaymaster.PostOpMode mode,\n UserOpInfo memory opInfo,\n bytes memory context,\n uint256 actualGas\n ) private returns (uint256 actualGasCost) {\n uint256 preGas = gasleft();\n unchecked {\n address refundAddress;\n MemoryUserOp memory mUserOp = opInfo.mUserOp;\n uint256 gasPrice = getUserOpGasPrice(mUserOp);\n\n address paymaster = mUserOp.paymaster;\n if (paymaster == address(0)) {\n refundAddress = mUserOp.sender;\n } else {\n refundAddress = paymaster;\n if (context.length > 0) {\n actualGasCost = actualGas * gasPrice;\n if (mode != IPaymaster.PostOpMode.postOpReverted) {\n try IPaymaster(paymaster).postOp{\n gas: mUserOp.paymasterPostOpGasLimit\n }(mode, context, actualGasCost, gasPrice)\n // solhint-disable-next-line no-empty-blocks\n {} catch {\n bytes memory reason = Exec.getReturnData(REVERT_REASON_MAX_LEN);\n revert PostOpReverted(reason);\n }\n }\n }\n }\n actualGas += preGas - gasleft();\n\n // Calculating a penalty for unused execution gas\n {\n uint256 executionGasLimit = mUserOp.callGasLimit + mUserOp.paymasterPostOpGasLimit;\n uint256 executionGasUsed = actualGas - opInfo.preOpGas;\n // this check is required for the gas used within EntryPoint and not covered by explicit gas limits\n if (executionGasLimit > executionGasUsed) {\n uint256 unusedGas = executionGasLimit - executionGasUsed;\n uint256 unusedGasPenalty = (unusedGas * PENALTY_PERCENT) / 100;\n actualGas += unusedGasPenalty;\n }\n }\n\n actualGasCost = actualGas * gasPrice;\n uint256 prefund = opInfo.prefund;\n if (prefund < actualGasCost) {\n if (mode == IPaymaster.PostOpMode.postOpReverted) {\n actualGasCost = prefund;\n emitPrefundTooLow(opInfo);\n emitUserOperationEvent(opInfo, false, actualGasCost, actualGas);\n } else {\n assembly (\"memory-safe\") {\n mstore(0, INNER_REVERT_LOW_PREFUND)\n revert(0, 32)\n }\n }\n } else {\n uint256 refund = prefund - actualGasCost;\n _incrementDeposit(refundAddress, refund);\n bool success = mode == IPaymaster.PostOpMode.opSucceeded;\n emitUserOperationEvent(opInfo, success, actualGasCost, actualGas);\n }\n } // unchecked\n }\n\n /**\n * The gas price this UserOp agrees to pay.\n * Relayer/block builder might submit the TX with higher priorityFee, but the user should not.\n * @param mUserOp - The userOp to get the gas price from.\n */\n function getUserOpGasPrice(\n MemoryUserOp memory mUserOp\n ) internal view returns (uint256) {\n unchecked {\n uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n uint256 maxPriorityFeePerGas = mUserOp.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 /**\n * The offset of the given bytes in memory.\n * @param data - The bytes to get the offset of.\n */\n function getOffsetOfMemoryBytes(\n bytes memory data\n ) internal pure returns (uint256 offset) {\n assembly {\n offset := data\n }\n }\n\n /**\n * The bytes in memory at the given offset.\n * @param offset - The offset to get the bytes from.\n */\n function getMemoryBytesFromOffset(\n uint256 offset\n ) internal pure returns (bytes memory data) {\n assembly (\"memory-safe\") {\n data := offset\n }\n }\n\n /// @inheritdoc IEntryPoint\n function delegateAndRevert(address target, bytes calldata data) external {\n (bool success, bytes memory ret) = target.delegatecall(data);\n revert DelegateAndRevert(success, ret);\n }\n}\n" + }, + "account-abstraction/contracts/core/EntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n\nimport \"./EntryPoint.sol\";\nimport \"../interfaces/IEntryPointSimulations.sol\";\n\n/*\n * This contract inherits the EntryPoint and extends it with the view-only methods that are executed by\n * the bundler in order to check UserOperation validity and estimate its gas consumption.\n * This contract should never be deployed on-chain and is only used as a parameter for the \"eth_call\" request.\n */\ncontract EntryPointSimulations is EntryPoint, IEntryPointSimulations {\n // solhint-disable-next-line var-name-mixedcase\n AggregatorStakeInfo private NOT_AGGREGATED = AggregatorStakeInfo(address(0), StakeInfo(0, 0));\n\n SenderCreator private _senderCreator;\n\n function initSenderCreator() internal virtual {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(uint160(uint256(keccak256(abi.encodePacked(hex\"d694\", address(this), hex\"01\")))));\n _senderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator() internal view virtual override returns (SenderCreator) {\n // return the same senderCreator as real EntryPoint.\n // this call is slightly (100) more expensive than EntryPoint's access to immutable member\n return _senderCreator;\n }\n\n /**\n * simulation contract should not be deployed, and specifically, accounts should not trust\n * it as entrypoint, since the simulation functions don't check the signatures\n */\n constructor() {\n require(block.number < 100, \"should not be deployed\");\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n ){\n UserOpInfo memory outOpInfo;\n\n _simulationOnlyValidations(userOp);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, userOp, outOpInfo);\n StakeInfo memory paymasterInfo = _getStakeInfo(\n outOpInfo.mUserOp.paymaster\n );\n StakeInfo memory senderInfo = _getStakeInfo(outOpInfo.mUserOp.sender);\n StakeInfo memory factoryInfo;\n {\n bytes calldata initCode = userOp.initCode;\n address factory = initCode.length >= 20\n ? address(bytes20(initCode[0 : 20]))\n : address(0);\n factoryInfo = _getStakeInfo(factory);\n }\n\n address aggregator = address(uint160(validationData));\n ReturnInfo memory returnInfo = ReturnInfo(\n outOpInfo.preOpGas,\n outOpInfo.prefund,\n validationData,\n paymasterValidationData,\n getMemoryBytesFromOffset(outOpInfo.contextOffset)\n );\n\n AggregatorStakeInfo memory aggregatorInfo = NOT_AGGREGATED;\n if (uint160(aggregator) != SIG_VALIDATION_SUCCESS && uint160(aggregator) != SIG_VALIDATION_FAILED) {\n aggregatorInfo = AggregatorStakeInfo(\n aggregator,\n _getStakeInfo(aggregator)\n );\n }\n return ValidationResult(\n returnInfo,\n senderInfo,\n factoryInfo,\n paymasterInfo,\n aggregatorInfo\n );\n }\n\n /// @inheritdoc IEntryPointSimulations\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external nonReentrant\n returns (\n ExecutionResult memory\n ){\n UserOpInfo memory opInfo;\n _simulationOnlyValidations(op);\n (\n uint256 validationData,\n uint256 paymasterValidationData\n ) = _validatePrepayment(0, op, opInfo);\n\n uint256 paid = _executeUserOp(0, op, opInfo);\n bool targetSuccess;\n bytes memory targetResult;\n if (target != address(0)) {\n (targetSuccess, targetResult) = target.call(targetCallData);\n }\n return ExecutionResult(\n opInfo.preOpGas,\n paid,\n validationData,\n paymasterValidationData,\n targetSuccess,\n targetResult\n );\n }\n\n function _simulationOnlyValidations(\n PackedUserOperation calldata userOp\n )\n internal\n {\n //initialize senderCreator(). we can't rely on constructor\n initSenderCreator();\n\n try\n this._validateSenderAndPaymaster(\n userOp.initCode,\n userOp.sender,\n userOp.paymasterAndData\n )\n // solhint-disable-next-line no-empty-blocks\n {} catch Error(string memory revertReason) {\n if (bytes(revertReason).length != 0) {\n revert FailedOp(0, revertReason);\n }\n }\n }\n\n /**\n * Called only during simulation.\n * This function always reverts to prevent warm/cold storage differentiation in simulation vs execution.\n * @param initCode - The smart account constructor code.\n * @param sender - The sender address.\n * @param paymasterAndData - The paymaster address (followed by other params, ignored by this method)\n */\n function _validateSenderAndPaymaster(\n bytes calldata initCode,\n address sender,\n bytes calldata paymasterAndData\n ) external view {\n if (initCode.length == 0 && sender.code.length == 0) {\n // it would revert anyway. but give a meaningful message\n revert(\"AA20 account not deployed\");\n }\n if (paymasterAndData.length >= 20) {\n address paymaster = address(bytes20(paymasterAndData[0 : 20]));\n if (paymaster.code.length == 0) {\n // It would revert anyway. but give a meaningful message.\n revert(\"AA30 paymaster not deployed\");\n }\n }\n // always revert\n revert(\"\");\n }\n\n //make sure depositTo cost is more than normal EntryPoint's cost,\n // to mitigate DoS vector on the bundler\n // empiric test showed that without this wrapper, simulation depositTo costs less..\n function depositTo(address account) public override(IStakeManager, StakeManager) payable {\n unchecked{\n // silly code, to waste some gas to make sure depositTo is always little more\n // expensive than on-chain call\n uint256 x = 1;\n while (x < 5) {\n x++;\n }\n StakeManager.depositTo(account);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * must return this value in case of signature failure, instead of revert.\n */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * 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\n * 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 */\nstruct ValidationData {\n address aggregator;\n uint48 validAfter;\n uint48 validUntil;\n}\n\n/**\n * Extract sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n */\nfunction _parseValidationData(\n uint256 validationData\n) 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/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n */\nfunction _packValidationData(\n ValidationData memory data\n) pure returns (uint256) {\n return\n uint160(data.aggregator) |\n (uint256(data.validUntil) << 160) |\n (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 */\nfunction _packValidationData(\n bool sigFailed,\n uint48 validUntil,\n uint48 validAfter\n) pure returns (uint256) {\n return\n (sigFailed ? 1 : 0) |\n (uint256(validUntil) << 160) |\n (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 (\"memory-safe\") {\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\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n */\n function min(uint256 a, uint256 b) pure returns (uint256) {\n return a < b ? a : b;\n }\n" + }, + "account-abstraction/contracts/core/NonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\nimport \"../interfaces/INonceManager.sol\";\n\n/**\n * nonce management functionality\n */\nabstract contract NonceManager is INonceManager {\n\n /**\n * The next valid sequence number for a given nonce key.\n */\n mapping(address => mapping(uint192 => uint256)) public nonceSequenceNumber;\n\n /// @inheritdoc INonceManager\n function getNonce(address sender, uint192 key)\n public view override returns (uint256 nonce) {\n return nonceSequenceNumber[sender][key] | (uint256(key) << 64);\n }\n\n // allow an account to manually increment its own nonce.\n // (mainly so that during construction nonce can be made non-zero,\n // to \"absorb\" the gas cost of first nonce increment to 1st transaction (construction),\n // not to 2nd transaction)\n function incrementNonce(uint192 key) public override {\n nonceSequenceNumber[msg.sender][key]++;\n }\n\n /**\n * validate nonce uniqueness for this account.\n * called just after validateUserOp()\n * @return true if the nonce was incremented successfully.\n * false if the current nonce doesn't match the given one.\n */\n function _validateAndUpdateNonce(address sender, uint256 nonce) internal returns (bool) {\n\n uint192 key = uint192(nonce >> 64);\n uint64 seq = uint64(nonce);\n return nonceSequenceNumber[sender][key]++ == seq;\n }\n\n}\n" + }, + "account-abstraction/contracts/core/SenderCreator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/**\n * Helper contract for EntryPoint, to call userOp.initCode from a \"neutral\" address,\n * which is explicitly not the entryPoint itself.\n */\ncontract SenderCreator {\n /**\n * Call the \"initCode\" factory to create and return the sender account address.\n * @param initCode - The initCode value from a UserOp. contains 20 bytes of factory address,\n * followed by calldata.\n * @return sender - The returned address of the created account, or zero address on failure.\n */\n function createSender(\n bytes calldata initCode\n ) external returns (address sender) {\n address factory = address(bytes20(initCode[0:20]));\n bytes memory initCallData = initCode[20:];\n bool success;\n /* solhint-disable no-inline-assembly */\n assembly (\"memory-safe\") {\n success := call(\n gas(),\n factory,\n 0,\n add(initCallData, 0x20),\n mload(initCallData),\n 0,\n 32\n )\n sender := mload(0)\n }\n if (!success) {\n sender = address(0);\n }\n }\n}\n" + }, + "account-abstraction/contracts/core/StakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.23;\n\nimport \"../interfaces/IStakeManager.sol\";\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable not-rely-on-time */\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 a paymaster.\n */\nabstract contract StakeManager is IStakeManager {\n /// maps paymaster to their deposits and stakes\n mapping(address => DepositInfo) public deposits;\n\n /// @inheritdoc IStakeManager\n function getDepositInfo(\n address account\n ) public view returns (DepositInfo memory info) {\n return deposits[account];\n }\n\n /**\n * Internal method to return just the stake info.\n * @param addr - The account to query.\n */\n function _getStakeInfo(\n address addr\n ) internal view returns (StakeInfo memory info) {\n DepositInfo storage depositInfo = deposits[addr];\n info.stake = depositInfo.stake;\n info.unstakeDelaySec = depositInfo.unstakeDelaySec;\n }\n\n /// @inheritdoc IStakeManager\n function balanceOf(address account) public view returns (uint256) {\n return deposits[account].deposit;\n }\n\n receive() external payable {\n depositTo(msg.sender);\n }\n\n /**\n * Increments an account's deposit.\n * @param account - The account to increment.\n * @param amount - The amount to increment by.\n * @return the updated deposit of this account\n */\n function _incrementDeposit(address account, uint256 amount) internal returns (uint256) {\n DepositInfo storage info = deposits[account];\n uint256 newAmount = info.deposit + amount;\n info.deposit = newAmount;\n return newAmount;\n }\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\n */\n function depositTo(address account) public virtual payable {\n uint256 newDeposit = _incrementDeposit(account, msg.value);\n emit Deposited(account, newDeposit);\n }\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) public payable {\n DepositInfo storage info = deposits[msg.sender];\n require(unstakeDelaySec > 0, \"must specify unstake delay\");\n require(\n unstakeDelaySec >= info.unstakeDelaySec,\n \"cannot decrease unstake time\"\n );\n uint256 stake = info.stake + msg.value;\n require(stake > 0, \"no stake specified\");\n require(stake <= type(uint112).max, \"stake overflow\");\n deposits[msg.sender] = DepositInfo(\n info.deposit,\n true,\n uint112(stake),\n unstakeDelaySec,\n 0\n );\n emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n }\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 DepositInfo storage info = deposits[msg.sender];\n require(info.unstakeDelaySec != 0, \"not staked\");\n require(info.staked, \"already unstaking\");\n uint48 withdrawTime = uint48(block.timestamp) + info.unstakeDelaySec;\n info.withdrawTime = withdrawTime;\n info.staked = false;\n emit StakeUnlocked(msg.sender, withdrawTime);\n }\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 DepositInfo storage info = deposits[msg.sender];\n uint256 stake = info.stake;\n require(stake > 0, \"No stake to withdraw\");\n require(info.withdrawTime > 0, \"must call unlockStake() first\");\n require(\n info.withdrawTime <= block.timestamp,\n \"Stake withdrawal is not due\"\n );\n info.unstakeDelaySec = 0;\n info.withdrawTime = 0;\n info.stake = 0;\n emit StakeWithdrawn(msg.sender, withdrawAddress, stake);\n (bool success,) = withdrawAddress.call{value: stake}(\"\");\n require(success, \"failed to withdraw stake\");\n }\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external {\n DepositInfo storage info = deposits[msg.sender];\n require(withdrawAmount <= info.deposit, \"Withdraw amount too large\");\n info.deposit = info.deposit - withdrawAmount;\n emit Withdrawn(msg.sender, withdrawAddress, withdrawAmount);\n (bool success,) = withdrawAddress.call{value: withdrawAmount}(\"\");\n require(success, \"failed to withdraw\");\n }\n}\n" + }, + "account-abstraction/contracts/core/UserOperationLib.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n /**\n * Get sender from user operation data.\n * @param userOp - The user operation data.\n */\n function getSender(\n PackedUserOperation calldata userOp\n ) internal pure returns (address) {\n address data;\n //read sender from userOp, which is first userOp member (saves 800 gas...)\n assembly {\n data := calldataload(userOp)\n }\n return address(uint160(data));\n }\n\n /**\n * Relayer/block builder might submit the TX with higher priorityFee,\n * but the user should not pay above what he signed for.\n * @param userOp - The user operation data.\n */\n function gasPrice(\n PackedUserOperation calldata userOp\n ) internal view returns (uint256) {\n unchecked {\n (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\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 /**\n * Pack the user operation data into bytes for hashing.\n * @param userOp - The user operation data.\n */\n function encode(\n PackedUserOperation calldata userOp\n ) 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 bytes32 accountGasLimits = userOp.accountGasLimits;\n uint256 preVerificationGas = userOp.preVerificationGas;\n bytes32 gasFees = userOp.gasFees;\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n return abi.encode(\n sender, nonce,\n hashInitCode, hashCallData,\n accountGasLimits, preVerificationGas, gasFees,\n hashPaymasterAndData\n );\n }\n\n function unpackUints(\n bytes32 packed\n ) internal pure returns (uint256 high128, uint256 low128) {\n return (uint128(bytes16(packed)), uint128(uint256(packed)));\n }\n\n //unpack just the high 128-bits from a packed value\n function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n return uint256(packed) >> 128;\n }\n\n // unpack just the low 128-bits from a packed value\n function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n return uint128(uint256(packed));\n }\n\n function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.gasFees);\n }\n\n function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.gasFees);\n }\n\n function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackHigh128(userOp.accountGasLimits);\n }\n\n function unpackCallGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return unpackLow128(userOp.accountGasLimits);\n }\n\n function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n }\n\n function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n internal pure returns (uint256) {\n return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n }\n\n function unpackPaymasterStaticFields(\n bytes calldata paymasterAndData\n ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n return (\n address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n );\n }\n\n /**\n * Hash the user operation data.\n * @param userOp - The user operation data.\n */\n function hash(\n PackedUserOperation calldata userOp\n ) internal pure returns (bytes32) {\n return keccak256(encode(userOp));\n }\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccount.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n /**\n * Validate user's signature and nonce\n * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n * This allows making a \"simulation call\" without a valid signature\n * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n *\n * @dev Must validate caller is the entryPoint.\n * Must validate the signature and nonce\n * @param userOp - The operation that is about to be executed.\n * @param userOpHash - Hash of the user's request data. can be used as the basis for signature.\n * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n * This is the minimum amount to transfer to the sender(entryPoint) to be\n * able to make the call. The excess is left as a deposit in the entrypoint\n * for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n * In case there is a paymaster in the request (or the current deposit is high\n * enough), this value will be zero.\n * @return validationData - Packaged ValidationData structure. use `_packValidationData` and\n * `_unpackValidationData` to encode and decode.\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 * If an account doesn't use time-range, it is enough to\n * return SIG_VALIDATION_FAILED value (1) for signature failure.\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n ) external returns (uint256 validationData);\n}\n" + }, + "account-abstraction/contracts/interfaces/IAccountExecute.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n /**\n * Account may implement this execute method.\n * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n * to the account.\n * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n *\n * @param userOp - The operation that was just validated.\n * @param userOpHash - Hash of the user's request data.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IAggregator.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n /**\n * Validate aggregated signature.\n * Revert if the aggregated signature does not match the given list of operations.\n * @param userOps - Array of UserOperations to validate the signature for.\n * @param signature - The aggregated signature.\n */\n function validateSignatures(\n PackedUserOperation[] calldata userOps,\n bytes calldata signature\n ) external view;\n\n /**\n * Validate signature of a single userOp.\n * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n * the aggregator this account uses.\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(\n PackedUserOperation 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(\n PackedUserOperation[] calldata userOps\n ) external view returns (bytes memory aggregatedSignature);\n}\n" + }, + "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.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\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,\n * validation and execution).\n */\n event UserOperationEvent(\n bytes32 indexed userOpHash,\n address indexed sender,\n address indexed paymaster,\n uint256 nonce,\n bool success,\n uint256 actualGasCost,\n uint256 actualGasUsed\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n address factory,\n address paymaster\n );\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(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * An event emitted if the UserOperation Paymaster's \"postOp\" call 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 PostOpRevertReason(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce,\n bytes revertReason\n );\n\n /**\n * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\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 */\n event UserOperationPrefundTooLow(\n bytes32 indexed userOpHash,\n address indexed sender,\n uint256 nonce\n );\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 * @param aggregator - The aggregator used for the following UserOperationEvents.\n */\n event SignatureAggregatorChanged(address indexed aggregator);\n\n /**\n * A custom revert error of handleOps, to identify the offending op.\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 * 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. The string starts with a unique code \"AAmn\",\n * 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 */\n error FailedOp(uint256 opIndex, string reason);\n\n /**\n * A custom revert error of handleOps, to report a revert by account or paymaster.\n * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n * @param reason - Revert reason. see FailedOp(uint256,string), above\n * @param inner - data from inner cought revert reason\n * @dev note that inner is truncated to 2048 bytes\n */\n error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n error PostOpReverted(bytes returnData);\n\n /**\n * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n * @param aggregator The aggregator that failed to verify the signature\n */\n error SignatureValidationFailed(address aggregator);\n\n // Return value of getSenderAddress.\n error SenderAddressResult(address sender);\n\n // UserOps handled, per aggregator.\n struct UserOpsPerAggregator {\n PackedUserOperation[] userOps;\n // Aggregator address\n IAggregator aggregator;\n // Aggregated signature\n bytes signature;\n }\n\n /**\n * Execute a batch of UserOperations.\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(\n PackedUserOperation[] calldata ops,\n address payable beneficiary\n ) 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 * @param userOp - The user operation to generate the request ID for.\n * @return hash the hash of this UserOperation\n */\n function getUserOpHash(\n PackedUserOperation calldata userOp\n ) external view returns (bytes32);\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 accountValidationData - returned validationData from account.\n * @param paymasterValidationData - return validationData from paymaster.\n * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n */\n struct ReturnInfo {\n uint256 preOpGas;\n uint256 prefund;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\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 error DelegateAndRevert(bool success, bytes ret);\n\n /**\n * Helper method for dry-run testing.\n * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n * actual EntryPoint code is less convenient.\n * @param target a target contract to make a delegatecall from entrypoint\n * @param data data to pass to target in a delegatecall\n */\n function delegateAndRevert(address target, bytes calldata data) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IEntryPointSimulations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IEntryPoint.sol\";\n\ninterface IEntryPointSimulations is IEntryPoint {\n // Return value of simulateHandleOp.\n struct ExecutionResult {\n uint256 preOpGas;\n uint256 paid;\n uint256 accountValidationData;\n uint256 paymasterValidationData;\n bool targetSuccess;\n bytes targetResult;\n }\n\n /**\n * Successful result from simulateValidation.\n * If the account returns a signature aggregator the \"aggregatorInfo\" struct is filled in as well.\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 struct ValidationResult {\n ReturnInfo returnInfo;\n StakeInfo senderInfo;\n StakeInfo factoryInfo;\n StakeInfo paymasterInfo;\n AggregatorStakeInfo aggregatorInfo;\n }\n\n /**\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage\n * outside the account's data.\n * @param userOp - The user operation to validate.\n * @return the validation result structure\n */\n function simulateValidation(\n PackedUserOperation calldata userOp\n )\n external\n returns (\n ValidationResult memory\n );\n\n /**\n * Simulate full execution of a UserOperation (including both validation and target execution)\n * It performs full validation of the UserOperation, but ignores signature error.\n * An optional target address is called after the userop succeeds,\n * and its value is returned (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,\n * the targetSuccess and targetResult are set to the return from that call.\n * @param targetCallData - CallData to pass to target address.\n * @return the execution result structure\n */\n function simulateHandleOp(\n PackedUserOperation calldata op,\n address target,\n bytes calldata targetCallData\n )\n external\n returns (\n ExecutionResult memory\n );\n}\n" + }, + "account-abstraction/contracts/interfaces/INonceManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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" + }, + "account-abstraction/contracts/interfaces/IPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./PackedUserOperation.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 enum PostOpMode {\n // User op succeeded.\n opSucceeded,\n // User op reverted. Still has to pay for gas.\n opReverted,\n // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value\n postOpReverted\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. Zero length to signify postOp is not required.\n * @return validationData - Signature and time-range of this operation, encoded the same as the return\n * value of validateUserOperation.\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\n * other values are invalid for paymaster.\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(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n 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. The paymaster still has to pay for gas.\n * postOpReverted - never passed in a call to postOp().\n * @param context - The context value returned by validatePaymasterUserOp\n * @param actualGasCost - Actual gas used so far (without this postOp call).\n * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas\n * and maxPriorityFee (and basefee)\n * It is not the same as tx.gasprice, which is what the bundler pays.\n */\n function postOp(\n PostOpMode mode,\n bytes calldata context,\n uint256 actualGasCost,\n uint256 actualUserOpFeePerGas\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/IStakeManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\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 event Deposited(address indexed account, uint256 totalDeposit);\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(address indexed account, uint256 withdrawTime);\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 fits into one cell (used during handleOp)\n * and the rest fit into a 2nd cell (used during stake/unstake)\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 uint256 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 /**\n * Get deposit info.\n * @param account - The account to query.\n * @return info - Full deposit information of given account.\n */\n function getDepositInfo(\n address account\n ) external view returns (DepositInfo memory info);\n\n /**\n * Get account balance.\n * @param account - The account to query.\n * @return - The deposit (for gas payment) of the account.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * Add to the deposit of the given account.\n * @param account - The account to add to.\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(\n address payable withdrawAddress,\n uint256 withdrawAmount\n ) external;\n}\n" + }, + "account-abstraction/contracts/interfaces/PackedUserOperation.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\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 accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.\n * Covers batch overhead.\n * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n * 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 */\nstruct PackedUserOperation {\n address sender;\n uint256 nonce;\n bytes initCode;\n bytes callData;\n bytes32 accountGasLimits;\n uint256 preVerificationGas;\n bytes32 gasFees;\n bytes paymasterAndData;\n bytes signature;\n}\n" + }, + "account-abstraction/contracts/utils/Exec.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.23;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n function call(\n address to,\n uint256 value,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function staticcall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal view returns (bool success) {\n assembly (\"memory-safe\") {\n success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function delegateCall(\n address to,\n bytes memory data,\n uint256 txGas\n ) internal returns (bool success) {\n assembly (\"memory-safe\") {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // get returned data from last call or calldelegate\n function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n assembly (\"memory-safe\") {\n let len := returndatasize()\n if gt(len, maxLen) {\n len := maxLen\n }\n let ptr := mload(0x40)\n mstore(0x40, add(ptr, add(len, 0x20)))\n mstore(ptr, len)\n returndatacopy(add(ptr, 0x20), 0, len)\n returnData := ptr\n }\n }\n\n // revert with explicit byte array (probably reverted info from call)\n function revertWithData(bytes memory returnData) internal pure {\n assembly (\"memory-safe\") {\n revert(add(returnData, 32), mload(returnData))\n }\n }\n\n function callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n bool success = call(to,0,data,gasleft());\n if (!success) {\n revertWithData(getReturnData(maxLen));\n }\n }\n}\n" + }, + "ds-test/test.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity >=0.5.0;\n\ncontract DSTest {\n event log (string);\n event logs (bytes);\n\n event log_address (address);\n event log_bytes32 (bytes32);\n event log_int (int);\n event log_uint (uint);\n event log_bytes (bytes);\n event log_string (string);\n\n event log_named_address (string key, address val);\n event log_named_bytes32 (string key, bytes32 val);\n event log_named_decimal_int (string key, int val, uint decimals);\n event log_named_decimal_uint (string key, uint val, uint decimals);\n event log_named_int (string key, int val);\n event log_named_uint (string key, uint val);\n event log_named_bytes (string key, bytes val);\n event log_named_string (string key, string val);\n\n bool public IS_TEST = true;\n bool private _failed;\n\n address constant HEVM_ADDRESS =\n address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n modifier mayRevert() { _; }\n modifier testopts(string memory) { _; }\n\n function failed() public returns (bool) {\n if (_failed) {\n return _failed;\n } else {\n bool globalFailed = false;\n if (hasHEVMContext()) {\n (, bytes memory retdata) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"load(address,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"))\n )\n );\n globalFailed = abi.decode(retdata, (bool));\n }\n return globalFailed;\n }\n }\n\n function fail() internal virtual {\n if (hasHEVMContext()) {\n (bool status, ) = HEVM_ADDRESS.call(\n abi.encodePacked(\n bytes4(keccak256(\"store(address,bytes32,bytes32)\")),\n abi.encode(HEVM_ADDRESS, bytes32(\"failed\"), bytes32(uint256(0x01)))\n )\n );\n status; // Silence compiler warnings\n }\n _failed = true;\n }\n\n function hasHEVMContext() internal view returns (bool) {\n uint256 hevmCodeSize = 0;\n assembly {\n hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n }\n return hevmCodeSize > 0;\n }\n\n modifier logs_gas() {\n uint startGas = gasleft();\n _;\n uint endGas = gasleft();\n emit log_named_uint(\"gas\", startGas - endGas);\n }\n\n function assertTrue(bool condition) internal {\n if (!condition) {\n emit log(\"Error: Assertion Failed\");\n fail();\n }\n }\n\n function assertTrue(bool condition, string memory err) internal {\n if (!condition) {\n emit log_named_string(\"Error\", err);\n assertTrue(condition);\n }\n }\n\n function assertEq(address a, address b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertEq(address a, address b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes32 a, bytes32 b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a != b) {\n emit log_named_string (\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq32(bytes32 a, bytes32 b) internal {\n assertEq(a, b);\n }\n function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertEq(a, b, err);\n }\n\n function assertEq(int a, int b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertEq(int a, int b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEq(uint a, uint b) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertEq(uint a, uint b, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n function assertEqDecimal(int a, int b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals) internal {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEqDecimal(a, b, decimals);\n }\n }\n\n function assertNotEq(address a, address b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [address]\");\n emit log_named_address(\" Left\", a);\n emit log_named_address(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(address a, address b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function assertNotEq(bytes32 a, bytes32 b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [bytes32]\");\n emit log_named_bytes32(\" Left\", a);\n emit log_named_bytes32(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(bytes32 a, bytes32 b, string memory err) internal {\n if (a == b) {\n emit log_named_string (\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq32(bytes32 a, bytes32 b) internal {\n assertNotEq(a, b);\n }\n function assertNotEq32(bytes32 a, bytes32 b, string memory err) internal {\n assertNotEq(a, b, err);\n }\n\n function assertNotEq(int a, int b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(int a, int b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEq(uint a, uint b) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(uint a, uint b, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals) internal {\n if (a == b) {\n emit log(\"Error: a != b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n fail();\n }\n }\n function assertNotEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a == b) {\n emit log_named_string(\"Error\", err);\n assertNotEqDecimal(a, b, decimals);\n }\n }\n\n function assertGt(uint a, uint b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGt(uint a, uint b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGt(int a, int b) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGt(int a, int b, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGt(a, b);\n }\n }\n function assertGtDecimal(int a, int b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals) internal {\n if (a <= b) {\n emit log(\"Error: a > b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a <= b) {\n emit log_named_string(\"Error\", err);\n assertGtDecimal(a, b, decimals);\n }\n }\n\n function assertGe(uint a, uint b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertGe(uint a, uint b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGe(int a, int b) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertGe(int a, int b, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGe(a, b);\n }\n }\n function assertGeDecimal(int a, int b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals) internal {\n if (a < b) {\n emit log(\"Error: a >= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a < b) {\n emit log_named_string(\"Error\", err);\n assertGeDecimal(a, b, decimals);\n }\n }\n\n function assertLt(uint a, uint b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLt(uint a, uint b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLt(int a, int b) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLt(int a, int b, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLt(a, b);\n }\n }\n function assertLtDecimal(int a, int b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals) internal {\n if (a >= b) {\n emit log(\"Error: a < b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a >= b) {\n emit log_named_string(\"Error\", err);\n assertLtDecimal(a, b, decimals);\n }\n }\n\n function assertLe(uint a, uint b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [uint]\");\n emit log_named_uint(\" Value a\", a);\n emit log_named_uint(\" Value b\", b);\n fail();\n }\n }\n function assertLe(uint a, uint b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLe(int a, int b) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [int]\");\n emit log_named_int(\" Value a\", a);\n emit log_named_int(\" Value b\", b);\n fail();\n }\n }\n function assertLe(int a, int b, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLe(a, b);\n }\n }\n function assertLeDecimal(int a, int b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal int]\");\n emit log_named_decimal_int(\" Value a\", a, decimals);\n emit log_named_decimal_int(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals) internal {\n if (a > b) {\n emit log(\"Error: a <= b not satisfied [decimal uint]\");\n emit log_named_decimal_uint(\" Value a\", a, decimals);\n emit log_named_decimal_uint(\" Value b\", b, decimals);\n fail();\n }\n }\n function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n if (a > b) {\n emit log_named_string(\"Error\", err);\n assertLeDecimal(a, b, decimals);\n }\n }\n\n function assertEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a == b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertNotEq(string memory a, string memory b) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log(\"Error: a != b not satisfied [string]\");\n emit log_named_string(\" Left\", a);\n emit log_named_string(\" Right\", b);\n fail();\n }\n }\n function assertNotEq(string memory a, string memory b, string memory err) internal {\n if (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))) {\n emit log_named_string(\"Error\", err);\n assertNotEq(a, b);\n }\n }\n\n function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n ok = true;\n if (a.length == b.length) {\n for (uint i = 0; i < a.length; i++) {\n if (a[i] != b[i]) {\n ok = false;\n }\n }\n } else {\n ok = false;\n }\n }\n function assertEq0(bytes memory a, bytes memory b) internal {\n if (!checkEq0(a, b)) {\n emit log(\"Error: a == b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (!checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertEq0(a, b);\n }\n }\n\n function assertNotEq0(bytes memory a, bytes memory b) internal {\n if (checkEq0(a, b)) {\n emit log(\"Error: a != b not satisfied [bytes]\");\n emit log_named_bytes(\" Left\", a);\n emit log_named_bytes(\" Right\", b);\n fail();\n }\n }\n function assertNotEq0(bytes memory a, bytes memory b, string memory err) internal {\n if (checkEq0(a, b)) {\n emit log_named_string(\"Error\", err);\n assertNotEq0(a, b);\n }\n }\n}\n" + }, + "forge-std/Base.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {StdStorage} from \"./StdStorage.sol\";\nimport {Vm, VmSafe} from \"./Vm.sol\";\n\nabstract contract CommonBase {\n // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D.\n address internal constant VM_ADDRESS = address(uint160(uint256(keccak256(\"hevm cheat code\"))));\n // console.sol and console2.sol work by executing a staticcall to this address.\n address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;\n // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38.\n address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256(\"foundry default caller\"))));\n // Address of the test contract, deployed by the DEFAULT_SENDER.\n address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;\n // Deterministic deployment address of the Multicall3 contract.\n address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;\n // The order of the secp256k1 curve.\n uint256 internal constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n\n uint256 internal constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n Vm internal constant vm = Vm(VM_ADDRESS);\n StdStorage internal stdstore;\n}\n\nabstract contract TestBase is CommonBase {}\n\nabstract contract ScriptBase is CommonBase {\n VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);\n}\n" + }, + "forge-std/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary console {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _sendLogPayload(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n }\n\n function logUint(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function logString(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n }\n\n function log(string memory p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n }\n\n function log(uint p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n }\n\n function log(uint p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n }\n\n function log(uint p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n }\n\n function log(string memory p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n }\n\n function log(uint p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal view {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/console2.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\n/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should\n/// use `int256` and `uint256`. This modified version fixes that. This version is recommended\n/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in\n/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`.\n/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178\nlibrary console2 {\n address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n function _castLogPayloadViewToPure(\n function(bytes memory) internal view fnIn\n ) internal pure returns (function(bytes memory) internal pure fnOut) {\n assembly {\n fnOut := fnIn\n }\n }\n\n function _sendLogPayload(bytes memory payload) internal pure {\n _castLogPayloadViewToPure(_sendLogPayloadView)(payload);\n }\n\n function _sendLogPayloadView(bytes memory payload) private view {\n uint256 payloadLength = payload.length;\n address consoleAddress = CONSOLE_ADDRESS;\n /// @solidity memory-safe-assembly\n assembly {\n let payloadStart := add(payload, 32)\n let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n }\n }\n\n function log() internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log()\"));\n }\n\n function logInt(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function logUint(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function logString(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function logBool(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function logAddress(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function logBytes(bytes memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n }\n\n function logBytes1(bytes1 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n }\n\n function logBytes2(bytes2 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n }\n\n function logBytes3(bytes3 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n }\n\n function logBytes4(bytes4 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n }\n\n function logBytes5(bytes5 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n }\n\n function logBytes6(bytes6 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n }\n\n function logBytes7(bytes7 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n }\n\n function logBytes8(bytes8 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n }\n\n function logBytes9(bytes9 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n }\n\n function logBytes10(bytes10 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n }\n\n function logBytes11(bytes11 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n }\n\n function logBytes12(bytes12 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n }\n\n function logBytes13(bytes13 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n }\n\n function logBytes14(bytes14 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n }\n\n function logBytes15(bytes15 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n }\n\n function logBytes16(bytes16 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n }\n\n function logBytes17(bytes17 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n }\n\n function logBytes18(bytes18 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n }\n\n function logBytes19(bytes19 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n }\n\n function logBytes20(bytes20 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n }\n\n function logBytes21(bytes21 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n }\n\n function logBytes22(bytes22 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n }\n\n function logBytes23(bytes23 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n }\n\n function logBytes24(bytes24 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n }\n\n function logBytes25(bytes25 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n }\n\n function logBytes26(bytes26 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n }\n\n function logBytes27(bytes27 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n }\n\n function logBytes28(bytes28 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n }\n\n function logBytes29(bytes29 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n }\n\n function logBytes30(bytes30 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n }\n\n function logBytes31(bytes31 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n }\n\n function logBytes32(bytes32 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n }\n\n function log(uint256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", p0));\n }\n\n function log(int256 p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n }\n\n function log(string memory p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n }\n\n function log(bool p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n }\n\n function log(address p0) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n }\n\n function log(uint256 p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n }\n\n function log(uint256 p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n }\n\n function log(uint256 p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n }\n\n function log(string memory p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n }\n\n function log(string memory p0, int256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,int256)\", p0, p1));\n }\n\n function log(string memory p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n }\n\n function log(string memory p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n }\n\n function log(string memory p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n }\n\n function log(bool p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", p0, p1));\n }\n\n function log(bool p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n }\n\n function log(bool p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n }\n\n function log(bool p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n }\n\n function log(address p0, uint256 p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", p0, p1));\n }\n\n function log(address p0, string memory p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n }\n\n function log(address p0, bool p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n }\n\n function log(address p0, address p1) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n }\n\n function log(string memory p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n }\n\n function log(address p0, string memory p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, string memory p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n }\n\n function log(address p0, address p1, address p2) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(string memory p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, string memory p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, string memory p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, string memory p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n _sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n }\n\n}" + }, + "forge-std/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "forge-std/interfaces/IMulticall3.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\ninterface IMulticall3 {\n struct Call {\n address target;\n bytes callData;\n }\n\n struct Call3 {\n address target;\n bool allowFailure;\n bytes callData;\n }\n\n struct Call3Value {\n address target;\n bool allowFailure;\n uint256 value;\n bytes callData;\n }\n\n struct Result {\n bool success;\n bytes returnData;\n }\n\n function aggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes[] memory returnData);\n\n function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);\n\n function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);\n\n function blockAndAggregate(Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n\n function getBasefee() external view returns (uint256 basefee);\n\n function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);\n\n function getBlockNumber() external view returns (uint256 blockNumber);\n\n function getChainId() external view returns (uint256 chainid);\n\n function getCurrentBlockCoinbase() external view returns (address coinbase);\n\n function getCurrentBlockDifficulty() external view returns (uint256 difficulty);\n\n function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);\n\n function getCurrentBlockTimestamp() external view returns (uint256 timestamp);\n\n function getEthBalance(address addr) external view returns (uint256 balance);\n\n function getLastBlockHash() external view returns (bytes32 blockHash);\n\n function tryAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (Result[] memory returnData);\n\n function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)\n external\n payable\n returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);\n}\n" + }, + "forge-std/safeconsole.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\n/// @author philogy \n/// @dev Code generated automatically by script.\nlibrary safeconsole {\n uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;\n\n // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)\n // for the view-to-pure log trick.\n function _sendLogPayload(uint256 offset, uint256 size) private pure {\n function(uint256, uint256) internal view fnIn = _sendLogPayloadView;\n function(uint256, uint256) internal pure pureSendLogPayload;\n assembly {\n pureSendLogPayload := fnIn\n }\n pureSendLogPayload(offset, size);\n }\n\n function _sendLogPayloadView(uint256 offset, uint256 size) private view {\n assembly {\n pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))\n }\n }\n\n function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {\n function(uint256, uint256, uint256) internal view fnIn = _memcopyView;\n function(uint256, uint256, uint256) internal pure pureMemcopy;\n assembly {\n pureMemcopy := fnIn\n }\n pureMemcopy(fromOffset, toOffset, length);\n }\n\n function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {\n assembly {\n pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))\n }\n }\n\n function logMemory(uint256 offset, uint256 length) internal pure {\n if (offset >= 0x60) {\n // Sufficient memory before slice to prepare call header.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(sub(offset, 0x60))\n m1 := mload(sub(offset, 0x40))\n m2 := mload(sub(offset, 0x20))\n // Selector of `logBytes(bytes)`.\n mstore(sub(offset, 0x60), 0xe17bf956)\n mstore(sub(offset, 0x40), 0x20)\n mstore(sub(offset, 0x20), length)\n }\n _sendLogPayload(offset - 0x44, length + 0x44);\n assembly {\n mstore(sub(offset, 0x60), m0)\n mstore(sub(offset, 0x40), m1)\n mstore(sub(offset, 0x20), m2)\n }\n } else {\n // Insufficient space, so copy slice forward, add header and reverse.\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n uint256 endOffset = offset + length;\n assembly {\n m0 := mload(add(endOffset, 0x00))\n m1 := mload(add(endOffset, 0x20))\n m2 := mload(add(endOffset, 0x40))\n }\n _memcopy(offset, offset + 0x60, length);\n assembly {\n // Selector of `logBytes(bytes)`.\n mstore(add(offset, 0x00), 0xe17bf956)\n mstore(add(offset, 0x20), 0x20)\n mstore(add(offset, 0x40), length)\n }\n _sendLogPayload(offset + 0x1c, length + 0x44);\n _memcopy(offset + 0x60, offset, length);\n assembly {\n mstore(add(endOffset, 0x00), m0)\n mstore(add(endOffset, 0x20), m1)\n mstore(add(endOffset, 0x40), m2)\n }\n }\n }\n\n function log(address p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(address)`.\n mstore(0x00, 0x2c2ecbc2)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bool p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(bool)`.\n mstore(0x00, 0x32458eed)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(uint256 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n // Selector of `log(uint256)`.\n mstore(0x00, 0xf82c50f1)\n mstore(0x20, p0)\n }\n _sendLogPayload(0x1c, 0x24);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n }\n }\n\n function log(bytes32 p0) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(string)`.\n mstore(0x00, 0x41304fac)\n mstore(0x20, 0x20)\n writeString(0x40, p0)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,address)`.\n mstore(0x00, 0xdaf0d4aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,bool)`.\n mstore(0x00, 0x75b605d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(address,uint256)`.\n mstore(0x00, 0x8309e8a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(address p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,string)`.\n mstore(0x00, 0x759f86bb)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,address)`.\n mstore(0x00, 0x853c4849)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,bool)`.\n mstore(0x00, 0x2a110e83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(bool,uint256)`.\n mstore(0x00, 0x399174d3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(bool p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,string)`.\n mstore(0x00, 0x8feac525)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,address)`.\n mstore(0x00, 0x69276c86)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,bool)`.\n mstore(0x00, 0x1c9d7eb3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n // Selector of `log(uint256,uint256)`.\n mstore(0x00, 0xf666715a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n }\n _sendLogPayload(0x1c, 0x44);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n }\n }\n\n function log(uint256 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,string)`.\n mstore(0x00, 0x643fd0df)\n mstore(0x20, p0)\n mstore(0x40, 0x40)\n writeString(0x60, p1)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, address p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,address)`.\n mstore(0x00, 0x319af333)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bool p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,bool)`.\n mstore(0x00, 0xc3b55635)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, uint256 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(string,uint256)`.\n mstore(0x00, 0xb60e72cc)\n mstore(0x20, 0x40)\n mstore(0x40, p1)\n writeString(0x60, p0)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bytes32 p0, bytes32 p1) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,string)`.\n mstore(0x00, 0x4b5c4277)\n mstore(0x20, 0x40)\n mstore(0x40, 0x80)\n writeString(0x60, p0)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,address)`.\n mstore(0x00, 0x018c84c2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,bool)`.\n mstore(0x00, 0xf2a66286)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,address,uint256)`.\n mstore(0x00, 0x17fe6185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,address,string)`.\n mstore(0x00, 0x007150be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,address)`.\n mstore(0x00, 0xf11699ed)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,bool)`.\n mstore(0x00, 0xeb830c92)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,bool,uint256)`.\n mstore(0x00, 0x9c4f99fb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,bool,string)`.\n mstore(0x00, 0x212255cc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,address)`.\n mstore(0x00, 0x7bc0d848)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,bool)`.\n mstore(0x00, 0x678209a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(address,uint256,uint256)`.\n mstore(0x00, 0xb69bcaf6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,uint256,string)`.\n mstore(0x00, 0xa1f2e8aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,address)`.\n mstore(0x00, 0xf08744e8)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,bool)`.\n mstore(0x00, 0xcf020fb1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(address,string,uint256)`.\n mstore(0x00, 0x67dd6ff1)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(address,string,string)`.\n mstore(0x00, 0xfb772265)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bool p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,address)`.\n mstore(0x00, 0xd2763667)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,bool)`.\n mstore(0x00, 0x18c9c746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,address,uint256)`.\n mstore(0x00, 0x5f7b9afb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,address,string)`.\n mstore(0x00, 0xde9a9270)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,address)`.\n mstore(0x00, 0x1078f68d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,bool)`.\n mstore(0x00, 0x50709698)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,bool,uint256)`.\n mstore(0x00, 0x12f21602)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,bool,string)`.\n mstore(0x00, 0x2555fa46)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,address)`.\n mstore(0x00, 0x088ef9d2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,bool)`.\n mstore(0x00, 0xe8defba9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(bool,uint256,uint256)`.\n mstore(0x00, 0x37103367)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,uint256,string)`.\n mstore(0x00, 0xc3fc3970)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,address)`.\n mstore(0x00, 0x9591b953)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,bool)`.\n mstore(0x00, 0xdbb4c247)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(bool,string,uint256)`.\n mstore(0x00, 0x1093ee11)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(bool,string,string)`.\n mstore(0x00, 0xb076847f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(uint256 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,address)`.\n mstore(0x00, 0xbcfd9be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,bool)`.\n mstore(0x00, 0x9b6ec042)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,address,uint256)`.\n mstore(0x00, 0x5a9b5ed5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,address,string)`.\n mstore(0x00, 0x63cb41f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,address)`.\n mstore(0x00, 0x35085f7b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,bool)`.\n mstore(0x00, 0x20718650)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,bool,uint256)`.\n mstore(0x00, 0x20098014)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,bool,string)`.\n mstore(0x00, 0x85775021)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,address)`.\n mstore(0x00, 0x5c96b331)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,bool)`.\n mstore(0x00, 0x4766da72)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n // Selector of `log(uint256,uint256,uint256)`.\n mstore(0x00, 0xd1ed7a3c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n }\n _sendLogPayload(0x1c, 0x64);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,uint256,string)`.\n mstore(0x00, 0x71d04af2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x60)\n writeString(0x80, p2)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,address)`.\n mstore(0x00, 0x7afac959)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,bool)`.\n mstore(0x00, 0x4ceda75a)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(uint256,string,uint256)`.\n mstore(0x00, 0x37aa7d4c)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, p2)\n writeString(0x80, p1)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(uint256,string,string)`.\n mstore(0x00, 0xb115611f)\n mstore(0x20, p0)\n mstore(0x40, 0x60)\n mstore(0x60, 0xa0)\n writeString(0x80, p1)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, address p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,address)`.\n mstore(0x00, 0xfcec75e0)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,bool)`.\n mstore(0x00, 0xc91d5ed4)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,address,uint256)`.\n mstore(0x00, 0x0d26b925)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,address,string)`.\n mstore(0x00, 0xe0e9ad4f)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,address)`.\n mstore(0x00, 0x932bbb38)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,bool)`.\n mstore(0x00, 0x850b7ad6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,bool,uint256)`.\n mstore(0x00, 0xc95958d6)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,bool,string)`.\n mstore(0x00, 0xe298f47d)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,address)`.\n mstore(0x00, 0x1c7ec448)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,bool)`.\n mstore(0x00, 0xca7733b1)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n // Selector of `log(string,uint256,uint256)`.\n mstore(0x00, 0xca47c4eb)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, p2)\n writeString(0x80, p0)\n }\n _sendLogPayload(0x1c, 0xa4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,uint256,string)`.\n mstore(0x00, 0x5970e089)\n mstore(0x20, 0x60)\n mstore(0x40, p1)\n mstore(0x60, 0xa0)\n writeString(0x80, p0)\n writeString(0xc0, p2)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,address)`.\n mstore(0x00, 0x95ed0195)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,bool)`.\n mstore(0x00, 0xb0e0f9b5)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n // Selector of `log(string,string,uint256)`.\n mstore(0x00, 0x5821efa1)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, p2)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n }\n _sendLogPayload(0x1c, 0xe4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n // Selector of `log(string,string,string)`.\n mstore(0x00, 0x2ced7cef)\n mstore(0x20, 0x60)\n mstore(0x40, 0xa0)\n mstore(0x60, 0xe0)\n writeString(0x80, p0)\n writeString(0xc0, p1)\n writeString(0x100, p2)\n }\n _sendLogPayload(0x1c, 0x124);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n }\n }\n\n function log(address p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,address)`.\n mstore(0x00, 0x665bf134)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,bool)`.\n mstore(0x00, 0x0e378994)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,address,uint256)`.\n mstore(0x00, 0x94250d77)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,address,string)`.\n mstore(0x00, 0xf808da20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,address)`.\n mstore(0x00, 0x9f1bc36e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,bool)`.\n mstore(0x00, 0x2cd4134a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,bool,uint256)`.\n mstore(0x00, 0x3971e78c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,bool,string)`.\n mstore(0x00, 0xaa6540c8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,address)`.\n mstore(0x00, 0x8da6def5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,bool)`.\n mstore(0x00, 0x9b4254e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,address,uint256,uint256)`.\n mstore(0x00, 0xbe553481)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,uint256,string)`.\n mstore(0x00, 0xfdb4f990)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,address)`.\n mstore(0x00, 0x8f736d16)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,bool)`.\n mstore(0x00, 0x6f1a594e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,address,string,uint256)`.\n mstore(0x00, 0xef1cefe7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,address,string,string)`.\n mstore(0x00, 0x21bdaf25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,address)`.\n mstore(0x00, 0x660375dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,bool)`.\n mstore(0x00, 0xa6f50b0f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,address,uint256)`.\n mstore(0x00, 0xa75c59de)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,address,string)`.\n mstore(0x00, 0x2dd778e6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,address)`.\n mstore(0x00, 0xcf394485)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,bool)`.\n mstore(0x00, 0xcac43479)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,bool,uint256)`.\n mstore(0x00, 0x8c4e5de6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,bool,string)`.\n mstore(0x00, 0xdfc4a2e8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,address)`.\n mstore(0x00, 0xccf790a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,bool)`.\n mstore(0x00, 0xc4643e20)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,bool,uint256,uint256)`.\n mstore(0x00, 0x386ff5f4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,uint256,string)`.\n mstore(0x00, 0x0aa6cfad)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,address)`.\n mstore(0x00, 0x19fd4956)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,bool)`.\n mstore(0x00, 0x50ad461d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,bool,string,uint256)`.\n mstore(0x00, 0x80e6a20b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,bool,string,string)`.\n mstore(0x00, 0x475c5c33)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,address)`.\n mstore(0x00, 0x478d1c62)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,bool)`.\n mstore(0x00, 0xa1bcc9b3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,address,uint256)`.\n mstore(0x00, 0x100f650e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,address,string)`.\n mstore(0x00, 0x1da986ea)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,address)`.\n mstore(0x00, 0xa31bfdcc)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,bool)`.\n mstore(0x00, 0x3bf5e537)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,bool,uint256)`.\n mstore(0x00, 0x22f6b999)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,bool,string)`.\n mstore(0x00, 0xc5ad85f9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,address)`.\n mstore(0x00, 0x20e3984d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,bool)`.\n mstore(0x00, 0x66f1bc67)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(address,uint256,uint256,uint256)`.\n mstore(0x00, 0x34f0e636)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,uint256,string)`.\n mstore(0x00, 0x4a28c017)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,address)`.\n mstore(0x00, 0x5c430d47)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,bool)`.\n mstore(0x00, 0xcf18105c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,uint256,string,uint256)`.\n mstore(0x00, 0xbf01f891)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,uint256,string,string)`.\n mstore(0x00, 0x88a8c406)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,address)`.\n mstore(0x00, 0x0d36fa20)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,bool)`.\n mstore(0x00, 0x0df12b76)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,address,uint256)`.\n mstore(0x00, 0x457fe3cf)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,address,string)`.\n mstore(0x00, 0xf7e36245)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,address)`.\n mstore(0x00, 0x205871c2)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,bool)`.\n mstore(0x00, 0x5f1d5c9f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,bool,uint256)`.\n mstore(0x00, 0x515e38b6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,bool,string)`.\n mstore(0x00, 0xbc0b61fe)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,address)`.\n mstore(0x00, 0x63183678)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,bool)`.\n mstore(0x00, 0x0ef7e050)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(address,string,uint256,uint256)`.\n mstore(0x00, 0x1dc8e1b8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,uint256,string)`.\n mstore(0x00, 0x448830a8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,address)`.\n mstore(0x00, 0xa04e2f87)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,bool)`.\n mstore(0x00, 0x35a5071f)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(address,string,string,uint256)`.\n mstore(0x00, 0x159f8927)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(address,string,string,string)`.\n mstore(0x00, 0x5d02c50b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bool p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,address)`.\n mstore(0x00, 0x1d14d001)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,bool)`.\n mstore(0x00, 0x46600be0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,address,uint256)`.\n mstore(0x00, 0x0c66d1be)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,address,string)`.\n mstore(0x00, 0xd812a167)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,address)`.\n mstore(0x00, 0x1c41a336)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,bool)`.\n mstore(0x00, 0x6a9c478b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,bool,uint256)`.\n mstore(0x00, 0x07831502)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,bool,string)`.\n mstore(0x00, 0x4a66cb34)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,address)`.\n mstore(0x00, 0x136b05dd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,bool)`.\n mstore(0x00, 0xd6019f1c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,address,uint256,uint256)`.\n mstore(0x00, 0x7bf181a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,uint256,string)`.\n mstore(0x00, 0x51f09ff8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,address)`.\n mstore(0x00, 0x6f7c603e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,bool)`.\n mstore(0x00, 0xe2bfd60b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,address,string,uint256)`.\n mstore(0x00, 0xc21f64c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,address,string,string)`.\n mstore(0x00, 0xa73c1db6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,address)`.\n mstore(0x00, 0xf4880ea4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,bool)`.\n mstore(0x00, 0xc0a302d8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,address,uint256)`.\n mstore(0x00, 0x4c123d57)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,address,string)`.\n mstore(0x00, 0xa0a47963)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,address)`.\n mstore(0x00, 0x8c329b1a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,bool)`.\n mstore(0x00, 0x3b2a5ce0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,bool,uint256)`.\n mstore(0x00, 0x6d7045c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,bool,string)`.\n mstore(0x00, 0x2ae408d4)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,address)`.\n mstore(0x00, 0x54a7a9a0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,bool)`.\n mstore(0x00, 0x619e4d0e)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,bool,uint256,uint256)`.\n mstore(0x00, 0x0bb00eab)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,uint256,string)`.\n mstore(0x00, 0x7dd4d0e0)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,address)`.\n mstore(0x00, 0xf9ad2b89)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,bool)`.\n mstore(0x00, 0xb857163a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,bool,string,uint256)`.\n mstore(0x00, 0xe3a9ca2f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,bool,string,string)`.\n mstore(0x00, 0x6d1e8751)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,address)`.\n mstore(0x00, 0x26f560a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,bool)`.\n mstore(0x00, 0xb4c314ff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,address,uint256)`.\n mstore(0x00, 0x1537dc87)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,address,string)`.\n mstore(0x00, 0x1bb3b09a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,address)`.\n mstore(0x00, 0x9acd3616)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,bool)`.\n mstore(0x00, 0xceb5f4d7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,bool,uint256)`.\n mstore(0x00, 0x7f9bbca2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,bool,string)`.\n mstore(0x00, 0x9143dbb1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,address)`.\n mstore(0x00, 0x00dd87b9)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,bool)`.\n mstore(0x00, 0xbe984353)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(bool,uint256,uint256,uint256)`.\n mstore(0x00, 0x374bb4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,uint256,string)`.\n mstore(0x00, 0x8e69fb5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,address)`.\n mstore(0x00, 0xfedd1fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,bool)`.\n mstore(0x00, 0xe5e70b2b)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,uint256,string,uint256)`.\n mstore(0x00, 0x6a1199e2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,uint256,string,string)`.\n mstore(0x00, 0xf5bc2249)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,address)`.\n mstore(0x00, 0x2b2b18dc)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,bool)`.\n mstore(0x00, 0x6dd434ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,address,uint256)`.\n mstore(0x00, 0xa5cada94)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,address,string)`.\n mstore(0x00, 0x12d6c788)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,address)`.\n mstore(0x00, 0x538e06ab)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,bool)`.\n mstore(0x00, 0xdc5e935b)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,bool,uint256)`.\n mstore(0x00, 0x1606a393)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,bool,string)`.\n mstore(0x00, 0x483d0416)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,address)`.\n mstore(0x00, 0x1596a1ce)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,bool)`.\n mstore(0x00, 0x6b0e5d53)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(bool,string,uint256,uint256)`.\n mstore(0x00, 0x28863fcb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,uint256,string)`.\n mstore(0x00, 0x1ad96de6)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,address)`.\n mstore(0x00, 0x97d394d8)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,bool)`.\n mstore(0x00, 0x1e4b87e5)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(bool,string,string,uint256)`.\n mstore(0x00, 0x7be0c3eb)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(bool,string,string,string)`.\n mstore(0x00, 0x1762e32a)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(uint256 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,address)`.\n mstore(0x00, 0x2488b414)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,bool)`.\n mstore(0x00, 0x091ffaf5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,address,uint256)`.\n mstore(0x00, 0x736efbb6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,address,string)`.\n mstore(0x00, 0x031c6f73)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,address)`.\n mstore(0x00, 0xef72c513)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,bool)`.\n mstore(0x00, 0xe351140f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,bool,uint256)`.\n mstore(0x00, 0x5abd992a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,bool,string)`.\n mstore(0x00, 0x90fb06aa)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,address)`.\n mstore(0x00, 0x15c127b5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,bool)`.\n mstore(0x00, 0x5f743a7c)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,address,uint256,uint256)`.\n mstore(0x00, 0x0c9cd9c1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,uint256,string)`.\n mstore(0x00, 0xddb06521)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,address)`.\n mstore(0x00, 0x9cba8fff)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,bool)`.\n mstore(0x00, 0xcc32ab07)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,address,string,uint256)`.\n mstore(0x00, 0x46826b5d)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,address,string,string)`.\n mstore(0x00, 0x3e128ca3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,address)`.\n mstore(0x00, 0xa1ef4cbb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,bool)`.\n mstore(0x00, 0x454d54a5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,address,uint256)`.\n mstore(0x00, 0x078287f5)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,address,string)`.\n mstore(0x00, 0xade052c7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,address)`.\n mstore(0x00, 0x69640b59)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,bool)`.\n mstore(0x00, 0xb6f577a1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,bool,uint256)`.\n mstore(0x00, 0x7464ce23)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,bool,string)`.\n mstore(0x00, 0xdddb9561)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,address)`.\n mstore(0x00, 0x88cb6041)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,bool)`.\n mstore(0x00, 0x91a02e2a)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,bool,uint256,uint256)`.\n mstore(0x00, 0xc6acc7a8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,uint256,string)`.\n mstore(0x00, 0xde03e774)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,address)`.\n mstore(0x00, 0xef529018)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,bool)`.\n mstore(0x00, 0xeb928d7f)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,bool,string,uint256)`.\n mstore(0x00, 0x2c1d0746)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,bool,string,string)`.\n mstore(0x00, 0x68c8b8bd)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,address)`.\n mstore(0x00, 0x56a5d1b1)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,bool)`.\n mstore(0x00, 0x15cac476)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,address,uint256)`.\n mstore(0x00, 0x88f6e4b2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,address,string)`.\n mstore(0x00, 0x6cde40b8)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,address)`.\n mstore(0x00, 0x9a816a83)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,bool)`.\n mstore(0x00, 0xab085ae6)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,bool,uint256)`.\n mstore(0x00, 0xeb7f6fd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,bool,string)`.\n mstore(0x00, 0xa5b4fc99)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,address)`.\n mstore(0x00, 0xfa8185af)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,bool)`.\n mstore(0x00, 0xc598d185)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n assembly {\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n // Selector of `log(uint256,uint256,uint256,uint256)`.\n mstore(0x00, 0x193fb800)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n }\n _sendLogPayload(0x1c, 0x84);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n }\n }\n\n function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,uint256,string)`.\n mstore(0x00, 0x59cfcbe3)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0x80)\n writeString(0xa0, p3)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,address)`.\n mstore(0x00, 0x42d21db7)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,bool)`.\n mstore(0x00, 0x7af6ab25)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,uint256,string,uint256)`.\n mstore(0x00, 0x5da297eb)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, p3)\n writeString(0xa0, p2)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,uint256,string,string)`.\n mstore(0x00, 0x27d8afd2)\n mstore(0x20, p0)\n mstore(0x40, p1)\n mstore(0x60, 0x80)\n mstore(0x80, 0xc0)\n writeString(0xa0, p2)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,address)`.\n mstore(0x00, 0x6168ed61)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,bool)`.\n mstore(0x00, 0x90c30a56)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,address,uint256)`.\n mstore(0x00, 0xe8d3018d)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,address,string)`.\n mstore(0x00, 0x9c3adfa1)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,address)`.\n mstore(0x00, 0xae2ec581)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,bool)`.\n mstore(0x00, 0xba535d9c)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,bool,uint256)`.\n mstore(0x00, 0xcf009880)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,bool,string)`.\n mstore(0x00, 0xd2d423cd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,address)`.\n mstore(0x00, 0x3b2279b4)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,bool)`.\n mstore(0x00, 0x691a8f74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(uint256,string,uint256,uint256)`.\n mstore(0x00, 0x82c25b74)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,uint256,string)`.\n mstore(0x00, 0xb7b914ca)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p1)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,address)`.\n mstore(0x00, 0xd583c602)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,bool)`.\n mstore(0x00, 0xb3a6b6bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(uint256,string,string,uint256)`.\n mstore(0x00, 0xb028c9bd)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(uint256,string,string,string)`.\n mstore(0x00, 0x21ad0683)\n mstore(0x20, p0)\n mstore(0x40, 0x80)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p1)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,address)`.\n mstore(0x00, 0xed8f28f6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,bool)`.\n mstore(0x00, 0xb59dbd60)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,address,uint256)`.\n mstore(0x00, 0x8ef3f399)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,address,string)`.\n mstore(0x00, 0x800a1c67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,address)`.\n mstore(0x00, 0x223603bd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,bool)`.\n mstore(0x00, 0x79884c2b)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,bool,uint256)`.\n mstore(0x00, 0x3e9f866a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,bool,string)`.\n mstore(0x00, 0x0454c079)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,address)`.\n mstore(0x00, 0x63fb8bc5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,bool)`.\n mstore(0x00, 0xfc4845f0)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,address,uint256,uint256)`.\n mstore(0x00, 0xf8f51b1e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,uint256,string)`.\n mstore(0x00, 0x5a477632)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,address)`.\n mstore(0x00, 0xaabc9a31)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,bool)`.\n mstore(0x00, 0x5f15d28c)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,address,string,uint256)`.\n mstore(0x00, 0x91d1112e)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,address,string,string)`.\n mstore(0x00, 0x245986f2)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,address)`.\n mstore(0x00, 0x33e9dd1d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,bool)`.\n mstore(0x00, 0x958c28c6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,address,uint256)`.\n mstore(0x00, 0x5d08bb05)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,address,string)`.\n mstore(0x00, 0x2d8e33a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,address)`.\n mstore(0x00, 0x7190a529)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,bool)`.\n mstore(0x00, 0x895af8c5)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,bool,uint256)`.\n mstore(0x00, 0x8e3f78a9)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,bool,string)`.\n mstore(0x00, 0x9d22d5dd)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,address)`.\n mstore(0x00, 0x935e09bf)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,bool)`.\n mstore(0x00, 0x8af7cf8a)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,bool,uint256,uint256)`.\n mstore(0x00, 0x64b5bb67)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,uint256,string)`.\n mstore(0x00, 0x742d6ee7)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,address)`.\n mstore(0x00, 0xe0625b29)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,bool)`.\n mstore(0x00, 0x3f8a701d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,bool,string,uint256)`.\n mstore(0x00, 0x24f91465)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,bool,string,string)`.\n mstore(0x00, 0xa826caeb)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,address)`.\n mstore(0x00, 0x5ea2b7ae)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,bool)`.\n mstore(0x00, 0x82112a42)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,address,uint256)`.\n mstore(0x00, 0x4f04fdc6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,address,string)`.\n mstore(0x00, 0x9ffb2f93)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,address)`.\n mstore(0x00, 0xe0e95b98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,bool)`.\n mstore(0x00, 0x354c36d6)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,bool,uint256)`.\n mstore(0x00, 0xe41b6f6f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,bool,string)`.\n mstore(0x00, 0xabf73a98)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,address)`.\n mstore(0x00, 0xe21de278)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,bool)`.\n mstore(0x00, 0x7626db92)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n // Selector of `log(string,uint256,uint256,uint256)`.\n mstore(0x00, 0xa7a87853)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n }\n _sendLogPayload(0x1c, 0xc4);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n }\n }\n\n function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,uint256,string)`.\n mstore(0x00, 0x854b3496)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, p2)\n mstore(0x80, 0xc0)\n writeString(0xa0, p0)\n writeString(0xe0, p3)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,address)`.\n mstore(0x00, 0x7c4632a4)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,bool)`.\n mstore(0x00, 0x7d24491d)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,uint256,string,uint256)`.\n mstore(0x00, 0xc67ea9d1)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,uint256,string,string)`.\n mstore(0x00, 0x5ab84e1f)\n mstore(0x20, 0x80)\n mstore(0x40, p1)\n mstore(0x60, 0xc0)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p2)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,address)`.\n mstore(0x00, 0x439c7bef)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,bool)`.\n mstore(0x00, 0x5ccd4e37)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,address,uint256)`.\n mstore(0x00, 0x7cc3c607)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,address,string)`.\n mstore(0x00, 0xeb1bff80)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,address)`.\n mstore(0x00, 0xc371c7db)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,bool)`.\n mstore(0x00, 0x40785869)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,bool,uint256)`.\n mstore(0x00, 0xd6aefad2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,bool,string)`.\n mstore(0x00, 0x5e84b0ea)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,address)`.\n mstore(0x00, 0x1023f7b2)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,bool)`.\n mstore(0x00, 0xc3a8a654)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n // Selector of `log(string,string,uint256,uint256)`.\n mstore(0x00, 0xf45d7d2c)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n }\n _sendLogPayload(0x1c, 0x104);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,uint256,string)`.\n mstore(0x00, 0x5d1a971a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, p2)\n mstore(0x80, 0x100)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p3)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,address)`.\n mstore(0x00, 0x6d572f44)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,bool)`.\n mstore(0x00, 0x2c1754ed)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n // Selector of `log(string,string,string,uint256)`.\n mstore(0x00, 0x8eafb02b)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, p3)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n }\n _sendLogPayload(0x1c, 0x144);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n }\n }\n\n function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {\n bytes32 m0;\n bytes32 m1;\n bytes32 m2;\n bytes32 m3;\n bytes32 m4;\n bytes32 m5;\n bytes32 m6;\n bytes32 m7;\n bytes32 m8;\n bytes32 m9;\n bytes32 m10;\n bytes32 m11;\n bytes32 m12;\n assembly {\n function writeString(pos, w) {\n let length := 0\n for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }\n mstore(pos, length)\n let shift := sub(256, shl(3, length))\n mstore(add(pos, 0x20), shl(shift, shr(shift, w)))\n }\n m0 := mload(0x00)\n m1 := mload(0x20)\n m2 := mload(0x40)\n m3 := mload(0x60)\n m4 := mload(0x80)\n m5 := mload(0xa0)\n m6 := mload(0xc0)\n m7 := mload(0xe0)\n m8 := mload(0x100)\n m9 := mload(0x120)\n m10 := mload(0x140)\n m11 := mload(0x160)\n m12 := mload(0x180)\n // Selector of `log(string,string,string,string)`.\n mstore(0x00, 0xde68f20a)\n mstore(0x20, 0x80)\n mstore(0x40, 0xc0)\n mstore(0x60, 0x100)\n mstore(0x80, 0x140)\n writeString(0xa0, p0)\n writeString(0xe0, p1)\n writeString(0x120, p2)\n writeString(0x160, p3)\n }\n _sendLogPayload(0x1c, 0x184);\n assembly {\n mstore(0x00, m0)\n mstore(0x20, m1)\n mstore(0x40, m2)\n mstore(0x60, m3)\n mstore(0x80, m4)\n mstore(0xa0, m5)\n mstore(0xc0, m6)\n mstore(0xe0, m7)\n mstore(0x100, m8)\n mstore(0x120, m9)\n mstore(0x140, m10)\n mstore(0x160, m11)\n mstore(0x180, m12)\n }\n }\n}\n" + }, + "forge-std/StdAssertions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {stdMath} from \"./StdMath.sol\";\n\nabstract contract StdAssertions is DSTest {\n event log_array(uint256[] val);\n event log_array(int256[] val);\n event log_array(address[] val);\n event log_named_array(string key, uint256[] val);\n event log_named_array(string key, int256[] val);\n event log_named_array(string key, address[] val);\n\n function fail(string memory err) internal virtual {\n emit log_named_string(\"Error\", err);\n fail();\n }\n\n function assertFalse(bool data) internal virtual {\n assertTrue(!data);\n }\n\n function assertFalse(bool data, string memory err) internal virtual {\n assertTrue(!data, err);\n }\n\n function assertEq(bool a, bool b) internal virtual {\n if (a != b) {\n emit log(\"Error: a == b not satisfied [bool]\");\n emit log_named_string(\" Left\", a ? \"true\" : \"false\");\n emit log_named_string(\" Right\", b ? \"true\" : \"false\");\n fail();\n }\n }\n\n function assertEq(bool a, bool b, string memory err) internal virtual {\n if (a != b) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(bytes memory a, bytes memory b) internal virtual {\n assertEq0(a, b);\n }\n\n function assertEq(bytes memory a, bytes memory b, string memory err) internal virtual {\n assertEq0(a, b, err);\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [uint[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [int[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(address[] memory a, address[] memory b) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log(\"Error: a == b not satisfied [address[]]\");\n emit log_named_array(\" Left\", a);\n emit log_named_array(\" Right\", b);\n fail();\n }\n }\n\n function assertEq(uint256[] memory a, uint256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(int256[] memory a, int256[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n function assertEq(address[] memory a, address[] memory b, string memory err) internal virtual {\n if (keccak256(abi.encode(a)) != keccak256(abi.encode(b))) {\n emit log_named_string(\"Error\", err);\n assertEq(a, b);\n }\n }\n\n // Legacy helper\n function assertEqUint(uint256 a, uint256 b) internal virtual {\n assertEq(uint256(a), uint256(b));\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(uint256 a, uint256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(uint256 a, uint256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_uint(\" Max Delta\", maxDelta);\n emit log_named_uint(\" Delta\", delta);\n fail();\n }\n }\n\n function assertApproxEqAbs(int256 a, int256 b, uint256 maxDelta, string memory err) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbs(a, b, maxDelta);\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals) internal virtual {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max Delta\", maxDelta, decimals);\n emit log_named_decimal_uint(\" Delta\", delta, decimals);\n fail();\n }\n }\n\n function assertApproxEqAbsDecimal(int256 a, int256 b, uint256 maxDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n uint256 delta = stdMath.delta(a, b);\n\n if (delta > maxDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqAbsDecimal(a, b, maxDelta, decimals);\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_uint(\" Left\", a);\n emit log_named_uint(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals\n ) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [uint]\");\n emit log_named_decimal_uint(\" Left\", a, decimals);\n emit log_named_decimal_uint(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(\n uint256 a,\n uint256 b,\n uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%\n uint256 decimals,\n string memory err\n ) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_int(\" Left\", a);\n emit log_named_int(\" Right\", b);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRel(int256 a, int256 b, uint256 maxPercentDelta, string memory err) internal virtual {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRel(a, b, maxPercentDelta);\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals) internal virtual {\n if (b == 0) return assertEq(a, b); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log(\"Error: a ~= b not satisfied [int]\");\n emit log_named_decimal_int(\" Left\", a, decimals);\n emit log_named_decimal_int(\" Right\", b, decimals);\n emit log_named_decimal_uint(\" Max % Delta\", maxPercentDelta * 100, 18);\n emit log_named_decimal_uint(\" % Delta\", percentDelta * 100, 18);\n fail();\n }\n }\n\n function assertApproxEqRelDecimal(int256 a, int256 b, uint256 maxPercentDelta, uint256 decimals, string memory err)\n internal\n virtual\n {\n if (b == 0) return assertEq(a, b, err); // If the left is 0, right must be too.\n\n uint256 percentDelta = stdMath.percentDelta(a, b);\n\n if (percentDelta > maxPercentDelta) {\n emit log_named_string(\"Error\", err);\n assertApproxEqRelDecimal(a, b, maxPercentDelta, decimals);\n }\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {\n assertEqCall(target, callDataA, target, callDataB, true);\n }\n\n function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)\n internal\n virtual\n {\n assertEqCall(targetA, callDataA, targetB, callDataB, true);\n }\n\n function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)\n internal\n virtual\n {\n assertEqCall(target, callDataA, target, callDataB, strictRevertData);\n }\n\n function assertEqCall(\n address targetA,\n bytes memory callDataA,\n address targetB,\n bytes memory callDataB,\n bool strictRevertData\n ) internal virtual {\n (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);\n (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);\n\n if (successA && successB) {\n assertEq(returnDataA, returnDataB, \"Call return data does not match\");\n }\n\n if (!successA && !successB && strictRevertData) {\n assertEq(returnDataA, returnDataB, \"Call revert data does not match\");\n }\n\n if (!successA && successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call revert data\", returnDataA);\n emit log_named_bytes(\" Right call return data\", returnDataB);\n fail();\n }\n\n if (successA && !successB) {\n emit log(\"Error: Calls were not equal\");\n emit log_named_bytes(\" Left call return data\", returnDataA);\n emit log_named_bytes(\" Right call revert data\", returnDataB);\n fail();\n }\n }\n}\n" + }, + "forge-std/StdChains.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n/**\n * StdChains provides information about EVM compatible chains that can be used in scripts/tests.\n * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are\n * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of\n * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the\n * alias used in this contract, which can be found as the first argument to the\n * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.\n *\n * There are two main ways to use this contract:\n * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or\n * `setChain(string memory chainAlias, Chain memory chain)`\n * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.\n *\n * The first time either of those are used, chains are initialized with the default set of RPC URLs.\n * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in\n * `defaultRpcUrls`.\n *\n * The `setChain` function is straightforward, and it simply saves off the given chain data.\n *\n * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say\n * we want to retrieve the RPC URL for `mainnet`:\n * - If you have specified data with `setChain`, it will return that.\n * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it\n * is valid (e.g. a URL is specified, or an environment variable is given and exists).\n * - If neither of the above conditions is met, the default data is returned.\n *\n * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\n */\nabstract contract StdChains {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n bool private stdChainsInitialized;\n\n struct ChainData {\n string name;\n uint256 chainId;\n string rpcUrl;\n }\n\n struct Chain {\n // The chain name.\n string name;\n // The chain's Chain ID.\n uint256 chainId;\n // The chain's alias. (i.e. what gets specified in `foundry.toml`).\n string chainAlias;\n // A default RPC endpoint for this chain.\n // NOTE: This default RPC URL is included for convenience to facilitate quick tests and\n // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy\n // usage as you will be throttled and this is a disservice to others who need this endpoint.\n string rpcUrl;\n }\n\n // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.\n mapping(string => Chain) private chains;\n // Maps from the chain's alias to it's default RPC URL.\n mapping(string => string) private defaultRpcUrls;\n // Maps from a chain ID to it's alias.\n mapping(uint256 => string) private idToAlias;\n\n bool private fallbackToDefaultRpcUrls = true;\n\n // The RPC URL will be fetched from config or defaultRpcUrls if possible.\n function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {\n require(bytes(chainAlias).length != 0, \"StdChains getChain(string): Chain alias cannot be the empty string.\");\n\n initializeStdChains();\n chain = chains[chainAlias];\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(string): Chain with alias \\\"\", chainAlias, \"\\\" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {\n require(chainId != 0, \"StdChains getChain(uint256): Chain ID cannot be 0.\");\n initializeStdChains();\n string memory chainAlias = idToAlias[chainId];\n\n chain = chains[chainAlias];\n\n require(\n chain.chainId != 0,\n string(abi.encodePacked(\"StdChains getChain(uint256): Chain with ID \", vm.toString(chainId), \" not found.\"))\n );\n\n chain = getChainWithUpdatedRpcUrl(chainAlias, chain);\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, ChainData memory chain) internal virtual {\n require(\n bytes(chainAlias).length != 0,\n \"StdChains setChain(string,ChainData): Chain alias cannot be the empty string.\"\n );\n\n require(chain.chainId != 0, \"StdChains setChain(string,ChainData): Chain ID cannot be 0.\");\n\n initializeStdChains();\n string memory foundAlias = idToAlias[chain.chainId];\n\n require(\n bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),\n string(\n abi.encodePacked(\n \"StdChains setChain(string,ChainData): Chain ID \",\n vm.toString(chain.chainId),\n \" already used by \\\"\",\n foundAlias,\n \"\\\".\"\n )\n )\n );\n\n uint256 oldChainId = chains[chainAlias].chainId;\n delete idToAlias[oldChainId];\n\n chains[chainAlias] =\n Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});\n idToAlias[chain.chainId] = chainAlias;\n }\n\n // set chain info, with priority to argument's rpcUrl field.\n function setChain(string memory chainAlias, Chain memory chain) internal virtual {\n setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));\n }\n\n function _toUpper(string memory str) private pure returns (string memory) {\n bytes memory strb = bytes(str);\n bytes memory copy = new bytes(strb.length);\n for (uint256 i = 0; i < strb.length; i++) {\n bytes1 b = strb[i];\n if (b >= 0x61 && b <= 0x7A) {\n copy[i] = bytes1(uint8(b) - 32);\n } else {\n copy[i] = b;\n }\n }\n return string(copy);\n }\n\n // lookup rpcUrl, in descending order of priority:\n // current -> config (foundry.toml) -> environment variable -> default\n function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {\n if (bytes(chain.rpcUrl).length == 0) {\n try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {\n chain.rpcUrl = configRpcUrl;\n } catch (bytes memory err) {\n string memory envName = string(abi.encodePacked(_toUpper(chainAlias), \"_RPC_URL\"));\n if (fallbackToDefaultRpcUrls) {\n chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);\n } else {\n chain.rpcUrl = vm.envString(envName);\n }\n // Distinguish 'not found' from 'cannot read'\n // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions\n bytes memory oldNotFoundError =\n abi.encodeWithSignature(\"CheatCodeError\", string(abi.encodePacked(\"invalid rpc url \", chainAlias)));\n bytes memory newNotFoundError = abi.encodeWithSignature(\n \"CheatcodeError(string)\", string(abi.encodePacked(\"invalid rpc url: \", chainAlias))\n );\n bytes32 errHash = keccak256(err);\n if (\n (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))\n || bytes(chain.rpcUrl).length == 0\n ) {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, err), mload(err))\n }\n }\n }\n }\n return chain;\n }\n\n function setFallbackToDefaultRpcUrls(bool useDefault) internal {\n fallbackToDefaultRpcUrls = useDefault;\n }\n\n function initializeStdChains() private {\n if (stdChainsInitialized) return;\n\n stdChainsInitialized = true;\n\n // If adding an RPC here, make sure to test the default RPC URL in `testRpcs`\n setChainWithDefaultRpcUrl(\"anvil\", ChainData(\"Anvil\", 31337, \"http://127.0.0.1:8545\"));\n setChainWithDefaultRpcUrl(\n \"mainnet\", ChainData(\"Mainnet\", 1, \"https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"goerli\", ChainData(\"Goerli\", 5, \"https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\n \"sepolia\", ChainData(\"Sepolia\", 11155111, \"https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001\")\n );\n setChainWithDefaultRpcUrl(\"optimism\", ChainData(\"Optimism\", 10, \"https://mainnet.optimism.io\"));\n setChainWithDefaultRpcUrl(\"optimism_goerli\", ChainData(\"Optimism Goerli\", 420, \"https://goerli.optimism.io\"));\n setChainWithDefaultRpcUrl(\"arbitrum_one\", ChainData(\"Arbitrum One\", 42161, \"https://arb1.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\n \"arbitrum_one_goerli\", ChainData(\"Arbitrum One Goerli\", 421613, \"https://goerli-rollup.arbitrum.io/rpc\")\n );\n setChainWithDefaultRpcUrl(\"arbitrum_nova\", ChainData(\"Arbitrum Nova\", 42170, \"https://nova.arbitrum.io/rpc\"));\n setChainWithDefaultRpcUrl(\"polygon\", ChainData(\"Polygon\", 137, \"https://polygon-rpc.com\"));\n setChainWithDefaultRpcUrl(\n \"polygon_mumbai\", ChainData(\"Polygon Mumbai\", 80001, \"https://rpc-mumbai.maticvigil.com\")\n );\n setChainWithDefaultRpcUrl(\"avalanche\", ChainData(\"Avalanche\", 43114, \"https://api.avax.network/ext/bc/C/rpc\"));\n setChainWithDefaultRpcUrl(\n \"avalanche_fuji\", ChainData(\"Avalanche Fuji\", 43113, \"https://api.avax-test.network/ext/bc/C/rpc\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain\", ChainData(\"BNB Smart Chain\", 56, \"https://bsc-dataseed1.binance.org\")\n );\n setChainWithDefaultRpcUrl(\n \"bnb_smart_chain_testnet\",\n ChainData(\"BNB Smart Chain Testnet\", 97, \"https://rpc.ankr.com/bsc_testnet_chapel\")\n );\n setChainWithDefaultRpcUrl(\"gnosis_chain\", ChainData(\"Gnosis Chain\", 100, \"https://rpc.gnosischain.com\"));\n setChainWithDefaultRpcUrl(\"moonbeam\", ChainData(\"Moonbeam\", 1284, \"https://rpc.api.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\n \"moonriver\", ChainData(\"Moonriver\", 1285, \"https://rpc.api.moonriver.moonbeam.network\")\n );\n setChainWithDefaultRpcUrl(\"moonbase\", ChainData(\"Moonbase\", 1287, \"https://rpc.testnet.moonbeam.network\"));\n setChainWithDefaultRpcUrl(\"base_goerli\", ChainData(\"Base Goerli\", 84531, \"https://goerli.base.org\"));\n setChainWithDefaultRpcUrl(\"base\", ChainData(\"Base\", 8453, \"https://mainnet.base.org\"));\n }\n\n // set chain info, with priority to chainAlias' rpc url in foundry.toml\n function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {\n string memory rpcUrl = chain.rpcUrl;\n defaultRpcUrls[chainAlias] = rpcUrl;\n chain.rpcUrl = \"\";\n setChain(chainAlias, chain);\n chain.rpcUrl = rpcUrl; // restore argument\n }\n}\n" + }, + "forge-std/StdCheats.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {console2} from \"./console2.sol\";\nimport {Vm} from \"./Vm.sol\";\n\nabstract contract StdCheatsSafe {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n bool private gasMeteringOff;\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawTx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n // json value name = function\n string functionSig;\n bytes32 hash;\n // json value name = tx\n RawTx1559Detail txDetail;\n // json value name = type\n string opcode;\n }\n\n struct RawTx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n bytes gas;\n bytes nonce;\n address to;\n bytes txType;\n bytes value;\n }\n\n struct Tx1559 {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n bytes32 hash;\n Tx1559Detail txDetail;\n string opcode;\n }\n\n struct Tx1559Detail {\n AccessList[] accessList;\n bytes data;\n address from;\n uint256 gas;\n uint256 nonce;\n address to;\n uint256 txType;\n uint256 value;\n }\n\n // Data structures to parse Transaction objects from the broadcast artifact\n // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct TxLegacy {\n string[] arguments;\n address contractAddress;\n string contractName;\n string functionSig;\n string hash;\n string opcode;\n TxDetailLegacy transaction;\n }\n\n struct TxDetailLegacy {\n AccessList[] accessList;\n uint256 chainId;\n bytes data;\n address from;\n uint256 gas;\n uint256 gasPrice;\n bytes32 hash;\n uint256 nonce;\n bytes1 opcode;\n bytes32 r;\n bytes32 s;\n uint256 txType;\n address to;\n uint8 v;\n uint256 value;\n }\n\n struct AccessList {\n address accessAddress;\n bytes32[] storageKeys;\n }\n\n // Data structures to parse Receipt objects from the broadcast artifact.\n // The Raw structs is what is parsed from the JSON\n // and then converted to the one that is used by the user for better UX.\n\n struct RawReceipt {\n bytes32 blockHash;\n bytes blockNumber;\n address contractAddress;\n bytes cumulativeGasUsed;\n bytes effectiveGasPrice;\n address from;\n bytes gasUsed;\n RawReceiptLog[] logs;\n bytes logsBloom;\n bytes status;\n address to;\n bytes32 transactionHash;\n bytes transactionIndex;\n }\n\n struct Receipt {\n bytes32 blockHash;\n uint256 blockNumber;\n address contractAddress;\n uint256 cumulativeGasUsed;\n uint256 effectiveGasPrice;\n address from;\n uint256 gasUsed;\n ReceiptLog[] logs;\n bytes logsBloom;\n uint256 status;\n address to;\n bytes32 transactionHash;\n uint256 transactionIndex;\n }\n\n // Data structures to parse the entire broadcast artifact, assuming the\n // transactions conform to EIP1559.\n\n struct EIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n Receipt[] receipts;\n uint256 timestamp;\n Tx1559[] transactions;\n TxReturn[] txReturns;\n }\n\n struct RawEIP1559ScriptArtifact {\n string[] libraries;\n string path;\n string[] pending;\n RawReceipt[] receipts;\n TxReturn[] txReturns;\n uint256 timestamp;\n RawTx1559[] transactions;\n }\n\n struct RawReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n bytes blockNumber;\n bytes data;\n bytes logIndex;\n bool removed;\n bytes32[] topics;\n bytes32 transactionHash;\n bytes transactionIndex;\n bytes transactionLogIndex;\n }\n\n struct ReceiptLog {\n // json value = address\n address logAddress;\n bytes32 blockHash;\n uint256 blockNumber;\n bytes data;\n uint256 logIndex;\n bytes32[] topics;\n uint256 transactionIndex;\n uint256 transactionLogIndex;\n bool removed;\n }\n\n struct TxReturn {\n string internalType;\n string value;\n }\n\n struct Account {\n address addr;\n uint256 key;\n }\n\n enum AddressType {\n Payable,\n NonPayable,\n ZeroAddress,\n Precompile,\n ForgeAddress\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n function assumeNotBlacklisted(address token, address addr) internal view virtual {\n // Nothing to check if `token` is not a contract.\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.\");\n\n bool success;\n bytes memory returnData;\n\n // 4-byte selector for `isBlacklisted(address)`, used by USDC.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n\n // 4-byte selector for `isBlackListed(address)`, used by USDT.\n (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));\n vm.assume(!success || abi.decode(returnData, (bool)) == false);\n }\n\n // Checks that `addr` is not blacklisted by token contracts that have a blacklist.\n // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for\n // backwards compatibility, since this name was used in the original PR which has already has\n // a release. This function can be removed in a future release once we want a breaking change.\n function assumeNoBlacklisted(address token, address addr) internal view virtual {\n assumeNotBlacklisted(token, addr);\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {\n if (addressType == AddressType.Payable) {\n assumeNotPayable(addr);\n } else if (addressType == AddressType.NonPayable) {\n assumePayable(addr);\n } else if (addressType == AddressType.ZeroAddress) {\n assumeNotZeroAddress(addr);\n } else if (addressType == AddressType.Precompile) {\n assumeNotPrecompile(addr);\n } else if (addressType == AddressType.ForgeAddress) {\n assumeNotForgeAddress(addr);\n }\n }\n\n function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n }\n\n function assumeAddressIsNot(\n address addr,\n AddressType addressType1,\n AddressType addressType2,\n AddressType addressType3,\n AddressType addressType4\n ) internal virtual {\n assumeAddressIsNot(addr, addressType1);\n assumeAddressIsNot(addr, addressType2);\n assumeAddressIsNot(addr, addressType3);\n assumeAddressIsNot(addr, addressType4);\n }\n\n // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to\n // `addr` and checking the `success` return value.\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used.\n function _isPayable(address addr) private returns (bool) {\n require(\n addr.balance < UINT256_MAX,\n \"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds\"\n );\n uint256 origBalanceTest = address(this).balance;\n uint256 origBalanceAddr = address(addr).balance;\n\n vm.deal(address(this), 1);\n (bool success,) = payable(addr).call{value: 1}(\"\");\n\n // reset balances\n vm.deal(address(this), origBalanceTest);\n vm.deal(addr, origBalanceAddr);\n\n return success;\n }\n\n // NOTE: This function may result in state changes depending on the fallback/receive logic\n // implemented by `addr`, which should be taken into account when this function is used. See the\n // `_isPayable` method for more information.\n function assumePayable(address addr) internal virtual {\n vm.assume(_isPayable(addr));\n }\n\n function assumeNotPayable(address addr) internal virtual {\n vm.assume(!_isPayable(addr));\n }\n\n function assumeNotZeroAddress(address addr) internal pure virtual {\n vm.assume(addr != address(0));\n }\n\n function assumeNotPrecompile(address addr) internal pure virtual {\n assumeNotPrecompile(addr, _pureChainId());\n }\n\n function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {\n // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific\n // address), but the same rationale for excluding them applies so we include those too.\n\n // These should be present on all EVM-compatible chains.\n vm.assume(addr < address(0x1) || addr > address(0x9));\n\n // forgefmt: disable-start\n if (chainId == 10 || chainId == 420) {\n // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21\n vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));\n } else if (chainId == 42161 || chainId == 421613) {\n // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains\n vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));\n } else if (chainId == 43114 || chainId == 43113) {\n // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59\n vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));\n vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));\n vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));\n }\n // forgefmt: disable-end\n }\n\n function assumeNotForgeAddress(address addr) internal pure virtual {\n // vm, console, and Create2Deployer addresses\n vm.assume(\n addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67\n && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C\n );\n }\n\n function readEIP1559ScriptArtifact(string memory path)\n internal\n view\n virtual\n returns (EIP1559ScriptArtifact memory)\n {\n string memory data = vm.readFile(path);\n bytes memory parsedData = vm.parseJson(data);\n RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));\n EIP1559ScriptArtifact memory artifact;\n artifact.libraries = rawArtifact.libraries;\n artifact.path = rawArtifact.path;\n artifact.timestamp = rawArtifact.timestamp;\n artifact.pending = rawArtifact.pending;\n artifact.txReturns = rawArtifact.txReturns;\n artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);\n artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);\n return artifact;\n }\n\n function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {\n Tx1559[] memory txs = new Tx1559[](rawTxs.length);\n for (uint256 i; i < rawTxs.length; i++) {\n txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);\n }\n return txs;\n }\n\n function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {\n Tx1559 memory transaction;\n transaction.arguments = rawTx.arguments;\n transaction.contractName = rawTx.contractName;\n transaction.functionSig = rawTx.functionSig;\n transaction.hash = rawTx.hash;\n transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);\n transaction.opcode = rawTx.opcode;\n return transaction;\n }\n\n function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)\n internal\n pure\n virtual\n returns (Tx1559Detail memory)\n {\n Tx1559Detail memory txDetail;\n txDetail.data = rawDetail.data;\n txDetail.from = rawDetail.from;\n txDetail.to = rawDetail.to;\n txDetail.nonce = _bytesToUint(rawDetail.nonce);\n txDetail.txType = _bytesToUint(rawDetail.txType);\n txDetail.value = _bytesToUint(rawDetail.value);\n txDetail.gas = _bytesToUint(rawDetail.gas);\n txDetail.accessList = rawDetail.accessList;\n return txDetail;\n }\n\n function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".transactions\");\n RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));\n return rawToConvertedEIPTx1559s(rawTxs);\n }\n\n function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".transactions[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));\n return rawToConvertedEIPTx1559(rawTx);\n }\n\n // Analogous to readTransactions, but for receipts.\n function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {\n string memory deployData = vm.readFile(path);\n bytes memory parsedDeployData = vm.parseJson(deployData, \".receipts\");\n RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));\n return rawToConvertedReceipts(rawReceipts);\n }\n\n function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {\n string memory deployData = vm.readFile(path);\n string memory key = string(abi.encodePacked(\".receipts[\", vm.toString(index), \"]\"));\n bytes memory parsedDeployData = vm.parseJson(deployData, key);\n RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));\n return rawToConvertedReceipt(rawReceipt);\n }\n\n function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {\n Receipt[] memory receipts = new Receipt[](rawReceipts.length);\n for (uint256 i; i < rawReceipts.length; i++) {\n receipts[i] = rawToConvertedReceipt(rawReceipts[i]);\n }\n return receipts;\n }\n\n function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {\n Receipt memory receipt;\n receipt.blockHash = rawReceipt.blockHash;\n receipt.to = rawReceipt.to;\n receipt.from = rawReceipt.from;\n receipt.contractAddress = rawReceipt.contractAddress;\n receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);\n receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);\n receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);\n receipt.status = _bytesToUint(rawReceipt.status);\n receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);\n receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);\n receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);\n receipt.logsBloom = rawReceipt.logsBloom;\n receipt.transactionHash = rawReceipt.transactionHash;\n return receipt;\n }\n\n function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)\n internal\n pure\n virtual\n returns (ReceiptLog[] memory)\n {\n ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);\n for (uint256 i; i < rawLogs.length; i++) {\n logs[i].logAddress = rawLogs[i].logAddress;\n logs[i].blockHash = rawLogs[i].blockHash;\n logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);\n logs[i].data = rawLogs[i].data;\n logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);\n logs[i].topics = rawLogs[i].topics;\n logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);\n logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);\n logs[i].removed = rawLogs[i].removed;\n }\n return logs;\n }\n\n // Deploy a contract by fetching the contract bytecode from\n // the artifacts directory\n // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`\n function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes): Deployment failed.\");\n }\n\n function deployCode(string memory what) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(0, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string): Deployment failed.\");\n }\n\n /// @dev deploy contract with value on construction\n function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,bytes,uint256): Deployment failed.\");\n }\n\n function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {\n bytes memory bytecode = vm.getCode(what);\n /// @solidity memory-safe-assembly\n assembly {\n addr := create(val, add(bytecode, 0x20), mload(bytecode))\n }\n\n require(addr != address(0), \"StdCheats deployCode(string,uint256): Deployment failed.\");\n }\n\n // creates a labeled address and the corresponding private key\n function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {\n privateKey = uint256(keccak256(abi.encodePacked(name)));\n addr = vm.addr(privateKey);\n vm.label(addr, name);\n }\n\n // creates a labeled address\n function makeAddr(string memory name) internal virtual returns (address addr) {\n (addr,) = makeAddrAndKey(name);\n }\n\n // Destroys an account immediately, sending the balance to beneficiary.\n // Destroying means: balance will be zero, code will be empty, and nonce will be 0\n // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce\n // only after tx ends, this will run immediately.\n function destroyAccount(address who, address beneficiary) internal virtual {\n uint256 currBalance = who.balance;\n vm.etch(who, abi.encode());\n vm.deal(who, 0);\n vm.resetNonce(who);\n\n uint256 beneficiaryBalance = beneficiary.balance;\n vm.deal(beneficiary, currBalance + beneficiaryBalance);\n }\n\n // creates a struct containing both a labeled address and the corresponding private key\n function makeAccount(string memory name) internal virtual returns (Account memory account) {\n (account.addr, account.key) = makeAddrAndKey(name);\n }\n\n function deriveRememberKey(string memory mnemonic, uint32 index)\n internal\n virtual\n returns (address who, uint256 privateKey)\n {\n privateKey = vm.deriveKey(mnemonic, index);\n who = vm.rememberKey(privateKey);\n }\n\n function _bytesToUint(bytes memory b) private pure returns (uint256) {\n require(b.length <= 32, \"StdCheats _bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n function isFork() internal view virtual returns (bool status) {\n try vm.activeFork() {\n status = true;\n } catch (bytes memory) {}\n }\n\n modifier skipWhenForking() {\n if (!isFork()) {\n _;\n }\n }\n\n modifier skipWhenNotForking() {\n if (isFork()) {\n _;\n }\n }\n\n modifier noGasMetering() {\n vm.pauseGasMetering();\n // To prevent turning gas monitoring back on with nested functions that use this modifier,\n // we check if gasMetering started in the off position. If it did, we don't want to turn\n // it back on until we exit the top level function that used the modifier\n //\n // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.\n // funcA will have `gasStartedOff` as false, funcB will have it as true,\n // so we only turn metering back on at the end of the funcA\n bool gasStartedOff = gasMeteringOff;\n gasMeteringOff = true;\n\n _;\n\n // if gas metering was on when this modifier was called, turn it back on at the end\n if (!gasStartedOff) {\n gasMeteringOff = false;\n vm.resumeGasMetering();\n }\n }\n\n // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no\n // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We\n // can't simply access the chain ID in a normal view or pure function because the solc View Pure\n // Checker changed `chainid` from pure to view in 0.8.0.\n function _viewChainId() private view returns (uint256 chainId) {\n // Assembly required since `block.chainid` was introduced in 0.8.0.\n assembly {\n chainId := chainid()\n }\n\n address(this); // Silence warnings in older Solc versions.\n }\n\n function _pureChainId() private pure returns (uint256 chainId) {\n function() internal view returns (uint256) fnIn = _viewChainId;\n function() internal pure returns (uint256) pureChainId;\n assembly {\n pureChainId := fnIn\n }\n chainId = pureChainId();\n }\n}\n\n// Wrappers around cheatcodes to avoid footguns\nabstract contract StdCheats is StdCheatsSafe {\n using stdStorage for StdStorage;\n\n StdStorage private stdstore;\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n\n // Skip forward or rewind time by the specified number of seconds\n function skip(uint256 time) internal virtual {\n vm.warp(block.timestamp + time);\n }\n\n function rewind(uint256 time) internal virtual {\n vm.warp(block.timestamp - time);\n }\n\n // Setup a prank from an address that has some ether\n function hoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender);\n }\n\n function hoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.prank(msgSender, origin);\n }\n\n function hoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.prank(msgSender, origin);\n }\n\n // Start perpetual prank from an address that has some ether\n function startHoax(address msgSender) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender);\n }\n\n function startHoax(address msgSender, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender);\n }\n\n // Start perpetual prank from an address that has some ether\n // tx.origin is set to the origin parameter\n function startHoax(address msgSender, address origin) internal virtual {\n vm.deal(msgSender, 1 << 128);\n vm.startPrank(msgSender, origin);\n }\n\n function startHoax(address msgSender, address origin, uint256 give) internal virtual {\n vm.deal(msgSender, give);\n vm.startPrank(msgSender, origin);\n }\n\n function changePrank(address msgSender) internal virtual {\n console2_log(\"changePrank is deprecated. Please use vm.startPrank instead.\");\n vm.stopPrank();\n vm.startPrank(msgSender);\n }\n\n function changePrank(address msgSender, address txOrigin) internal virtual {\n vm.stopPrank();\n vm.startPrank(msgSender, txOrigin);\n }\n\n // The same as Vm's `deal`\n // Use the alternative signature for ERC20 tokens\n function deal(address to, uint256 give) internal virtual {\n vm.deal(to, give);\n }\n\n // Set the balance of an account for any ERC20 token\n // Use the alternative signature to update `totalSupply`\n function deal(address token, address to, uint256 give) internal virtual {\n deal(token, to, give, false);\n }\n\n // Set the balance of an account for any ERC1155 token\n // Use the alternative signature to update `totalSupply`\n function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {\n dealERC1155(token, to, id, give, false);\n }\n\n function deal(address token, address to, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0x18160ddd).checked_write(totSup);\n }\n }\n\n function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {\n // get current balance\n (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));\n uint256 prevBal = abi.decode(balData, (uint256));\n\n // update balance\n stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);\n\n // update total supply\n if (adjust) {\n (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));\n require(\n totSupData.length != 0,\n \"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply.\"\n );\n uint256 totSup = abi.decode(totSupData, (uint256));\n if (give < prevBal) {\n totSup -= (prevBal - give);\n } else {\n totSup += (give - prevBal);\n }\n stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);\n }\n }\n\n function dealERC721(address token, address to, uint256 id) internal virtual {\n // check if token id is already minted and the actual owner.\n (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n // get owner current balance\n (, bytes memory fromBalData) =\n token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n // get new user current balance\n (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n // update balances\n stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n // update owner\n stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n }\n\n function deployCodeTo(string memory what, address where) internal virtual {\n deployCodeTo(what, \"\", 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {\n deployCodeTo(what, args, 0, where);\n }\n\n function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {\n bytes memory creationCode = vm.getCode(what);\n vm.etch(where, abi.encodePacked(creationCode, args));\n (bool success, bytes memory runtimeBytecode) = where.call{value: value}(\"\");\n require(success, \"StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.\");\n vm.etch(where, runtimeBytecode);\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n function console2_log(string memory p0) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string)\", p0));\n status;\n }\n}\n" + }, + "forge-std/StdError.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdError {\n bytes public constant assertionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x01);\n bytes public constant arithmeticError = abi.encodeWithSignature(\"Panic(uint256)\", 0x11);\n bytes public constant divisionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x12);\n bytes public constant enumConversionError = abi.encodeWithSignature(\"Panic(uint256)\", 0x21);\n bytes public constant encodeStorageError = abi.encodeWithSignature(\"Panic(uint256)\", 0x22);\n bytes public constant popError = abi.encodeWithSignature(\"Panic(uint256)\", 0x31);\n bytes public constant indexOOBError = abi.encodeWithSignature(\"Panic(uint256)\", 0x32);\n bytes public constant memOverflowError = abi.encodeWithSignature(\"Panic(uint256)\", 0x41);\n bytes public constant zeroVarError = abi.encodeWithSignature(\"Panic(uint256)\", 0x51);\n}\n" + }, + "forge-std/StdInvariant.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nabstract contract StdInvariant {\n struct FuzzSelector {\n address addr;\n bytes4[] selectors;\n }\n\n struct FuzzInterface {\n address addr;\n string[] artifacts;\n }\n\n address[] private _excludedContracts;\n address[] private _excludedSenders;\n address[] private _targetedContracts;\n address[] private _targetedSenders;\n\n string[] private _excludedArtifacts;\n string[] private _targetedArtifacts;\n\n FuzzSelector[] private _targetedArtifactSelectors;\n FuzzSelector[] private _targetedSelectors;\n\n FuzzInterface[] private _targetedInterfaces;\n\n // Functions for users:\n // These are intended to be called in tests.\n\n function excludeContract(address newExcludedContract_) internal {\n _excludedContracts.push(newExcludedContract_);\n }\n\n function excludeSender(address newExcludedSender_) internal {\n _excludedSenders.push(newExcludedSender_);\n }\n\n function excludeArtifact(string memory newExcludedArtifact_) internal {\n _excludedArtifacts.push(newExcludedArtifact_);\n }\n\n function targetArtifact(string memory newTargetedArtifact_) internal {\n _targetedArtifacts.push(newTargetedArtifact_);\n }\n\n function targetArtifactSelector(FuzzSelector memory newTargetedArtifactSelector_) internal {\n _targetedArtifactSelectors.push(newTargetedArtifactSelector_);\n }\n\n function targetContract(address newTargetedContract_) internal {\n _targetedContracts.push(newTargetedContract_);\n }\n\n function targetSelector(FuzzSelector memory newTargetedSelector_) internal {\n _targetedSelectors.push(newTargetedSelector_);\n }\n\n function targetSender(address newTargetedSender_) internal {\n _targetedSenders.push(newTargetedSender_);\n }\n\n function targetInterface(FuzzInterface memory newTargetedInterface_) internal {\n _targetedInterfaces.push(newTargetedInterface_);\n }\n\n // Functions for forge:\n // These are called by forge to run invariant tests and don't need to be called in tests.\n\n function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {\n excludedArtifacts_ = _excludedArtifacts;\n }\n\n function excludeContracts() public view returns (address[] memory excludedContracts_) {\n excludedContracts_ = _excludedContracts;\n }\n\n function excludeSenders() public view returns (address[] memory excludedSenders_) {\n excludedSenders_ = _excludedSenders;\n }\n\n function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {\n targetedArtifacts_ = _targetedArtifacts;\n }\n\n function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {\n targetedArtifactSelectors_ = _targetedArtifactSelectors;\n }\n\n function targetContracts() public view returns (address[] memory targetedContracts_) {\n targetedContracts_ = _targetedContracts;\n }\n\n function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {\n targetedSelectors_ = _targetedSelectors;\n }\n\n function targetSenders() public view returns (address[] memory targetedSenders_) {\n targetedSenders_ = _targetedSenders;\n }\n\n function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {\n targetedInterfaces_ = _targetedInterfaces;\n }\n}\n" + }, + "forge-std/StdJson.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {VmSafe} from \"./Vm.sol\";\n\n// Helpers for parsing and writing JSON files\n// To parse:\n// ```\n// using stdJson for string;\n// string memory json = vm.readFile(\"some_peth\");\n// json.parseUint(\"\");\n// ```\n// To write:\n// ```\n// using stdJson for string;\n// string memory json = \"deploymentArtifact\";\n// Contract contract = new Contract();\n// json.serialize(\"contractAddress\", address(contract));\n// json = json.serialize(\"deploymentTimes\", uint(1));\n// // store the stringified JSON to the 'json' variable we have been using as a key\n// // as we won't need it any longer\n// string memory json2 = \"finalArtifact\";\n// string memory final = json2.serialize(\"depArtifact\", json);\n// final.write(\"\");\n// ```\n\nlibrary stdJson {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJson(json, key);\n }\n\n function readUint(string memory json, string memory key) internal pure returns (uint256) {\n return vm.parseJsonUint(json, key);\n }\n\n function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {\n return vm.parseJsonUintArray(json, key);\n }\n\n function readInt(string memory json, string memory key) internal pure returns (int256) {\n return vm.parseJsonInt(json, key);\n }\n\n function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {\n return vm.parseJsonIntArray(json, key);\n }\n\n function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {\n return vm.parseJsonBytes32(json, key);\n }\n\n function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {\n return vm.parseJsonBytes32Array(json, key);\n }\n\n function readString(string memory json, string memory key) internal pure returns (string memory) {\n return vm.parseJsonString(json, key);\n }\n\n function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {\n return vm.parseJsonStringArray(json, key);\n }\n\n function readAddress(string memory json, string memory key) internal pure returns (address) {\n return vm.parseJsonAddress(json, key);\n }\n\n function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {\n return vm.parseJsonAddressArray(json, key);\n }\n\n function readBool(string memory json, string memory key) internal pure returns (bool) {\n return vm.parseJsonBool(json, key);\n }\n\n function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {\n return vm.parseJsonBoolArray(json, key);\n }\n\n function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {\n return vm.parseJsonBytes(json, key);\n }\n\n function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {\n return vm.parseJsonBytesArray(json, key);\n }\n\n function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {\n return vm.serializeJson(jsonKey, rootObject);\n }\n\n function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bool[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBool(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, uint256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeUint(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, int256[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeInt(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, address[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeAddress(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes32[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes32(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, bytes[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeBytes(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function serialize(string memory jsonKey, string memory key, string[] memory value)\n internal\n returns (string memory)\n {\n return vm.serializeString(jsonKey, key, value);\n }\n\n function write(string memory jsonKey, string memory path) internal {\n vm.writeJson(jsonKey, path);\n }\n\n function write(string memory jsonKey, string memory path, string memory valueKey) internal {\n vm.writeJson(jsonKey, path, valueKey);\n }\n}\n" + }, + "forge-std/StdMath.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nlibrary stdMath {\n int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;\n\n function abs(int256 a) internal pure returns (uint256) {\n // Required or it will fail when `a = type(int256).min`\n if (a == INT256_MIN) {\n return 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n }\n\n return uint256(a > 0 ? a : -a);\n }\n\n function delta(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a - b : b - a;\n }\n\n function delta(int256 a, int256 b) internal pure returns (uint256) {\n // a and b are of the same sign\n // this works thanks to two's complement, the left-most bit is the sign bit\n if ((a ^ b) > -1) {\n return delta(abs(a), abs(b));\n }\n\n // a and b are of opposite signs\n return abs(a) + abs(b);\n }\n\n function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n\n return absDelta * 1e18 / b;\n }\n\n function percentDelta(int256 a, int256 b) internal pure returns (uint256) {\n uint256 absDelta = delta(a, b);\n uint256 absB = abs(b);\n\n return absDelta * 1e18 / absB;\n }\n}\n" + }, + "forge-std/StdStorage.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\nimport {Vm} from \"./Vm.sol\";\n\nstruct StdStorage {\n mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;\n mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;\n bytes32[] _keys;\n bytes4 _sig;\n uint256 _depth;\n address _target;\n bytes32 _set;\n}\n\nlibrary stdStorageSafe {\n event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);\n event WARNING_UninitedSlot(address who, uint256 slot);\n\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return bytes4(keccak256(bytes(sigStr)));\n }\n\n /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against\n // slot complexity:\n // if flat, will be bytes32(uint256(uint));\n // if map, will be keccak256(abi.encode(key, uint(slot)));\n // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));\n // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);\n function find(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n // calldata to test against\n if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n vm.record();\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n (bytes32[] memory reads,) = vm.accesses(address(who));\n if (reads.length == 1) {\n bytes32 curr = vm.load(who, reads[0]);\n if (curr == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[0]));\n }\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n } else if (reads.length > 1) {\n for (uint256 i = 0; i < reads.length; i++) {\n bytes32 prev = vm.load(who, reads[i]);\n if (prev == bytes32(0)) {\n emit WARNING_UninitedSlot(who, uint256(reads[i]));\n }\n if (prev != fdat) {\n continue;\n }\n bytes32 new_val = ~prev;\n // store\n vm.store(who, reads[i], new_val);\n bool success;\n {\n bytes memory rdat;\n (success, rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n\n if (success && fdat == new_val) {\n // we found which of the slots is the actual one\n emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i]));\n self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]);\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true;\n vm.store(who, reads[i], prev);\n break;\n }\n vm.store(who, reads[i], prev);\n }\n } else {\n revert(\"stdStorage find(StdStorage): No storage use detected for target.\");\n }\n\n require(\n self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))],\n \"stdStorage find(StdStorage): Slot(s) not found.\"\n );\n\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n\n return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))];\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n self._target = _target;\n return self;\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n self._sig = _sig;\n return self;\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n self._sig = sigs(_sig);\n return self;\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n self._keys.push(bytes32(uint256(uint160(who))));\n return self;\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n self._keys.push(bytes32(amt));\n return self;\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n self._keys.push(key);\n return self;\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n self._depth = _depth;\n return self;\n }\n\n function read(StdStorage storage self) private returns (bytes memory) {\n address t = self._target;\n uint256 s = find(self);\n return abi.encode(vm.load(t, bytes32(s)));\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return abi.decode(read(self), (bytes32));\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n int256 v = read_int(self);\n if (v == 0) return false;\n if (v == 1) return true;\n revert(\"stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.\");\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return abi.decode(read(self), (address));\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return abi.decode(read(self), (uint256));\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return abi.decode(read(self), (int256));\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n return (uint256(parent_slot), key);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n address who = self._target;\n uint256 field_depth = self._depth;\n vm.startMappingRecording();\n uint256 child = find(self) - field_depth;\n bool found;\n bytes32 root_slot;\n bytes32 parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));\n if (!found) {\n revert(\n \"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called.\"\n );\n }\n while (found) {\n root_slot = parent_slot;\n (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));\n }\n return uint256(root_slot);\n }\n\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n\nlibrary stdStorage {\n Vm private constant vm = Vm(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n function sigs(string memory sigStr) internal pure returns (bytes4) {\n return stdStorageSafe.sigs(sigStr);\n }\n\n function find(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.find(self);\n }\n\n function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {\n return stdStorageSafe.target(self, _target);\n }\n\n function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {\n return stdStorageSafe.sig(self, _sig);\n }\n\n function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, who);\n }\n\n function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, amt);\n }\n\n function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {\n return stdStorageSafe.with_key(self, key);\n }\n\n function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {\n return stdStorageSafe.depth(self, _depth);\n }\n\n function checked_write(StdStorage storage self, address who) internal {\n checked_write(self, bytes32(uint256(uint160(who))));\n }\n\n function checked_write(StdStorage storage self, uint256 amt) internal {\n checked_write(self, bytes32(amt));\n }\n\n function checked_write_int(StdStorage storage self, int256 val) internal {\n checked_write(self, bytes32(uint256(val)));\n }\n\n function checked_write(StdStorage storage self, bool write) internal {\n bytes32 t;\n /// @solidity memory-safe-assembly\n assembly {\n t := write\n }\n checked_write(self, t);\n }\n\n function checked_write(StdStorage storage self, bytes32 set) internal {\n address who = self._target;\n bytes4 fsig = self._sig;\n uint256 field_depth = self._depth;\n bytes32[] memory ins = self._keys;\n\n bytes memory cald = abi.encodePacked(fsig, flatten(ins));\n if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) {\n find(self);\n }\n bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]);\n\n bytes32 fdat;\n {\n (, bytes memory rdat) = who.staticcall(cald);\n fdat = bytesToBytes32(rdat, 32 * field_depth);\n }\n bytes32 curr = vm.load(who, slot);\n\n if (fdat != curr) {\n require(\n false,\n \"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported.\"\n );\n }\n vm.store(who, slot, set);\n delete self._target;\n delete self._sig;\n delete self._keys;\n delete self._depth;\n }\n\n function read_bytes32(StdStorage storage self) internal returns (bytes32) {\n return stdStorageSafe.read_bytes32(self);\n }\n\n function read_bool(StdStorage storage self) internal returns (bool) {\n return stdStorageSafe.read_bool(self);\n }\n\n function read_address(StdStorage storage self) internal returns (address) {\n return stdStorageSafe.read_address(self);\n }\n\n function read_uint(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.read_uint(self);\n }\n\n function read_int(StdStorage storage self) internal returns (int256) {\n return stdStorageSafe.read_int(self);\n }\n\n function parent(StdStorage storage self) internal returns (uint256, bytes32) {\n return stdStorageSafe.parent(self);\n }\n\n function root(StdStorage storage self) internal returns (uint256) {\n return stdStorageSafe.root(self);\n }\n\n // Private function so needs to be copied over\n function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {\n bytes32 out;\n\n uint256 max = b.length > 32 ? 32 : b.length;\n for (uint256 i = 0; i < max; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n // Private function so needs to be copied over\n function flatten(bytes32[] memory b) private pure returns (bytes memory) {\n bytes memory result = new bytes(b.length * 32);\n for (uint256 i = 0; i < b.length; i++) {\n bytes32 k = b[i];\n /// @solidity memory-safe-assembly\n assembly {\n mstore(add(result, add(32, mul(32, i))), k)\n }\n }\n\n return result;\n }\n}\n" + }, + "forge-std/StdStyle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport {VmSafe} from \"./Vm.sol\";\n\nlibrary StdStyle {\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n\n string constant RED = \"\\u001b[91m\";\n string constant GREEN = \"\\u001b[92m\";\n string constant YELLOW = \"\\u001b[93m\";\n string constant BLUE = \"\\u001b[94m\";\n string constant MAGENTA = \"\\u001b[95m\";\n string constant CYAN = \"\\u001b[96m\";\n string constant BOLD = \"\\u001b[1m\";\n string constant DIM = \"\\u001b[2m\";\n string constant ITALIC = \"\\u001b[3m\";\n string constant UNDERLINE = \"\\u001b[4m\";\n string constant INVERSE = \"\\u001b[7m\";\n string constant RESET = \"\\u001b[0m\";\n\n function styleConcat(string memory style, string memory self) private pure returns (string memory) {\n return string(abi.encodePacked(style, self, RESET));\n }\n\n function red(string memory self) internal pure returns (string memory) {\n return styleConcat(RED, self);\n }\n\n function red(uint256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(int256 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(address self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function red(bool self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes(bytes memory self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function redBytes32(bytes32 self) internal pure returns (string memory) {\n return red(vm.toString(self));\n }\n\n function green(string memory self) internal pure returns (string memory) {\n return styleConcat(GREEN, self);\n }\n\n function green(uint256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(int256 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(address self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function green(bool self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes(bytes memory self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function greenBytes32(bytes32 self) internal pure returns (string memory) {\n return green(vm.toString(self));\n }\n\n function yellow(string memory self) internal pure returns (string memory) {\n return styleConcat(YELLOW, self);\n }\n\n function yellow(uint256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(int256 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(address self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellow(bool self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes(bytes memory self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function yellowBytes32(bytes32 self) internal pure returns (string memory) {\n return yellow(vm.toString(self));\n }\n\n function blue(string memory self) internal pure returns (string memory) {\n return styleConcat(BLUE, self);\n }\n\n function blue(uint256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(int256 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(address self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blue(bool self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes(bytes memory self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function blueBytes32(bytes32 self) internal pure returns (string memory) {\n return blue(vm.toString(self));\n }\n\n function magenta(string memory self) internal pure returns (string memory) {\n return styleConcat(MAGENTA, self);\n }\n\n function magenta(uint256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(int256 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(address self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magenta(bool self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes(bytes memory self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function magentaBytes32(bytes32 self) internal pure returns (string memory) {\n return magenta(vm.toString(self));\n }\n\n function cyan(string memory self) internal pure returns (string memory) {\n return styleConcat(CYAN, self);\n }\n\n function cyan(uint256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(int256 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(address self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyan(bool self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes(bytes memory self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function cyanBytes32(bytes32 self) internal pure returns (string memory) {\n return cyan(vm.toString(self));\n }\n\n function bold(string memory self) internal pure returns (string memory) {\n return styleConcat(BOLD, self);\n }\n\n function bold(uint256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(int256 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(address self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function bold(bool self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes(bytes memory self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function boldBytes32(bytes32 self) internal pure returns (string memory) {\n return bold(vm.toString(self));\n }\n\n function dim(string memory self) internal pure returns (string memory) {\n return styleConcat(DIM, self);\n }\n\n function dim(uint256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(int256 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(address self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dim(bool self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes(bytes memory self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function dimBytes32(bytes32 self) internal pure returns (string memory) {\n return dim(vm.toString(self));\n }\n\n function italic(string memory self) internal pure returns (string memory) {\n return styleConcat(ITALIC, self);\n }\n\n function italic(uint256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(int256 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(address self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italic(bool self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes(bytes memory self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function italicBytes32(bytes32 self) internal pure returns (string memory) {\n return italic(vm.toString(self));\n }\n\n function underline(string memory self) internal pure returns (string memory) {\n return styleConcat(UNDERLINE, self);\n }\n\n function underline(uint256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(int256 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(address self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underline(bool self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes(bytes memory self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function underlineBytes32(bytes32 self) internal pure returns (string memory) {\n return underline(vm.toString(self));\n }\n\n function inverse(string memory self) internal pure returns (string memory) {\n return styleConcat(INVERSE, self);\n }\n\n function inverse(uint256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(int256 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(address self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverse(bool self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes(bytes memory self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n\n function inverseBytes32(bytes32 self) internal pure returns (string memory) {\n return inverse(vm.toString(self));\n }\n}\n" + }, + "forge-std/StdUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\nimport {IMulticall3} from \"./interfaces/IMulticall3.sol\";\nimport {VmSafe} from \"./Vm.sol\";\n\nabstract contract StdUtils {\n /*//////////////////////////////////////////////////////////////////////////\n CONSTANTS\n //////////////////////////////////////////////////////////////////////////*/\n\n IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);\n VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256(\"hevm cheat code\")))));\n address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;\n uint256 private constant INT256_MIN_ABS =\n 57896044618658097711785492504343953926634992332820282019728792003956564819968;\n uint256 private constant SECP256K1_ORDER =\n 115792089237316195423570985008687907852837564279074904382605163141518161494337;\n uint256 private constant UINT256_MAX =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.\n address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;\n\n /*//////////////////////////////////////////////////////////////////////////\n INTERNAL FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {\n require(min <= max, \"StdUtils bound(uint256,uint256,uint256): Max is less than min.\");\n // If x is between min and max, return x directly. This is to ensure that dictionary values\n // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188\n if (x >= min && x <= max) return x;\n\n uint256 size = max - min + 1;\n\n // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.\n // This helps ensure coverage of the min/max values.\n if (x <= 3 && size > x) return min + x;\n if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);\n\n // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.\n if (x > max) {\n uint256 diff = x - max;\n uint256 rem = diff % size;\n if (rem == 0) return max;\n result = min + rem - 1;\n } else if (x < min) {\n uint256 diff = min - x;\n uint256 rem = diff % size;\n if (rem == 0) return min;\n result = max - rem + 1;\n }\n }\n\n function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound Result\", result);\n }\n\n function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {\n require(min <= max, \"StdUtils bound(int256,int256,int256): Max is less than min.\");\n\n // Shifting all int256 values to uint256 to use _bound function. The range of two types are:\n // int256 : -(2**255) ~ (2**255 - 1)\n // uint256: 0 ~ (2**256 - 1)\n // So, add 2**255, INT256_MIN_ABS to the integer values.\n //\n // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.\n // So, use `~uint256(x) + 1` instead.\n uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);\n uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);\n uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);\n\n uint256 y = _bound(_x, _min, _max);\n\n // To move it back to int256 value, subtract INT256_MIN_ABS at here.\n result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);\n }\n\n function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) {\n result = _bound(x, min, max);\n console2_log(\"Bound result\", vm.toString(result));\n }\n\n function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {\n result = _bound(privateKey, 1, SECP256K1_ORDER - 1);\n }\n\n function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {\n require(b.length <= 32, \"StdUtils bytesToUint(bytes): Bytes length exceeds 32.\");\n return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));\n }\n\n /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce\n /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol)\n function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {\n // forgefmt: disable-start\n // The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.\n // A one byte integer uses its own value as its length prefix, there is no additional \"0x80 + length\" prefix that comes before it.\n if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))));\n if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce))));\n\n // Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length.\n if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce))));\n if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce))));\n if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce))));\n // forgefmt: disable-end\n\n // More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp\n // 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce)\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n // 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex)\n // We assume nobody can have a nonce large enough to require more than 32 bytes.\n return addressFromLast20Bytes(\n keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce)))\n );\n }\n\n function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)\n internal\n pure\n virtual\n returns (address)\n {\n return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash)));\n }\n\n /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer\n function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {\n return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY);\n }\n\n /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {\n return hashInitCode(creationCode, \"\");\n }\n\n /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2\n /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode\n /// @param args the ABI-encoded arguments to the constructor of C\n function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(creationCode, args));\n }\n\n // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.\n function getTokenBalances(address token, address[] memory addresses)\n internal\n virtual\n returns (uint256[] memory balances)\n {\n uint256 tokenCodeSize;\n assembly {\n tokenCodeSize := extcodesize(token)\n }\n require(tokenCodeSize > 0, \"StdUtils getTokenBalances(address,address[]): Token address is not a contract.\");\n\n // ABI encode the aggregate call to Multicall3.\n uint256 length = addresses.length;\n IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);\n for (uint256 i = 0; i < length; ++i) {\n // 0x70a08231 = bytes4(\"balanceOf(address)\"))\n calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});\n }\n\n // Make the aggregate call.\n (, bytes[] memory returnData) = multicall.aggregate(calls);\n\n // ABI decode the return data and return the balances.\n balances = new uint256[](length);\n for (uint256 i = 0; i < length; ++i) {\n balances[i] = abi.decode(returnData[i], (uint256));\n }\n }\n\n /*//////////////////////////////////////////////////////////////////////////\n PRIVATE FUNCTIONS\n //////////////////////////////////////////////////////////////////////////*/\n\n function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {\n return address(uint160(uint256(bytesValue)));\n }\n\n // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.\n\n function console2_log(string memory p0, uint256 p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,uint256)\", p0, p1));\n status;\n }\n\n function console2_log(string memory p0, string memory p1) private view {\n (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n status;\n }\n}\n" + }, + "forge-std/Test.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// 💬 ABOUT\n// Forge Std's default Test.\n\n// 🧩 MODULES\nimport {console} from \"./console.sol\";\nimport {console2} from \"./console2.sol\";\nimport {safeconsole} from \"./safeconsole.sol\";\nimport {StdAssertions} from \"./StdAssertions.sol\";\nimport {StdChains} from \"./StdChains.sol\";\nimport {StdCheats} from \"./StdCheats.sol\";\nimport {stdError} from \"./StdError.sol\";\nimport {StdInvariant} from \"./StdInvariant.sol\";\nimport {stdJson} from \"./StdJson.sol\";\nimport {stdMath} from \"./StdMath.sol\";\nimport {StdStorage, stdStorage} from \"./StdStorage.sol\";\nimport {StdStyle} from \"./StdStyle.sol\";\nimport {StdUtils} from \"./StdUtils.sol\";\nimport {Vm} from \"./Vm.sol\";\n\n// 📦 BOILERPLATE\nimport {TestBase} from \"./Base.sol\";\nimport {DSTest} from \"ds-test/test.sol\";\n\n// ⭐️ TEST\nabstract contract Test is TestBase, DSTest, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {\n// Note: IS_TEST() must return true.\n// Note: Must have failure system, https://github.com/dapphub/ds-test/blob/cd98eff28324bfac652e63a239a60632a761790b/src/test.sol#L39-L76.\n}\n" + }, + "forge-std/Vm.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.2 <0.9.0;\n\npragma experimental ABIEncoderV2;\n\n// Cheatcodes are marked as view/pure/none using the following rules:\n// 0. A call's observable behaviour includes its return value, logs, reverts and state writes,\n// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc),\n// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`,\n// 3. Otherwise you're `pure`.\n\n// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n// result in Script simulations differing from on-chain execution. It is recommended to only use\n// these cheats in scripts.\ninterface VmSafe {\n // ======== Types ========\n enum CallerMode {\n None,\n Broadcast,\n RecurrentBroadcast,\n Prank,\n RecurrentPrank\n }\n\n struct Log {\n bytes32[] topics;\n bytes data;\n address emitter;\n }\n\n struct Rpc {\n string key;\n string url;\n }\n\n struct EthGetLogs {\n address emitter;\n bytes32[] topics;\n bytes data;\n bytes32 blockHash;\n uint64 blockNumber;\n bytes32 transactionHash;\n uint64 transactionIndex;\n uint256 logIndex;\n bool removed;\n }\n\n struct DirEntry {\n string errorMessage;\n string path;\n uint64 depth;\n bool isDir;\n bool isSymlink;\n }\n\n struct FsMetadata {\n bool isDir;\n bool isSymlink;\n uint256 length;\n bool readOnly;\n uint256 modified;\n uint256 accessed;\n uint256 created;\n }\n\n struct Wallet {\n address addr;\n uint256 publicKeyX;\n uint256 publicKeyY;\n uint256 privateKey;\n }\n\n struct FfiResult {\n int32 exitCode;\n bytes stdout;\n bytes stderr;\n }\n\n // ======== EVM ========\n\n // Gets the address for a given private key\n function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n // Gets the nonce of an account.\n // See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces.\n function getNonce(address account) external view returns (uint64 nonce);\n\n // Loads a storage slot from an address\n function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n // Signs data\n function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n // -------- Record Storage --------\n // Records all storage reads and writes\n function record() external;\n\n // Gets all accessed reads and write slot from a `vm.record` session, for a given address\n function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n // -------- Recording Map Writes --------\n\n // Starts recording all map SSTOREs for later retrieval.\n function startMappingRecording() external;\n\n // Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n function stopMappingRecording() external;\n\n // Gets the number of elements in the mapping at the given slot, for a given address.\n function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n // Gets the elements at index idx of the mapping at the given slot, for a given address. The\n // index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n // Gets the map key and parent of a mapping at a given slot, for a given address.\n function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n external\n returns (bool found, bytes32 key, bytes32 parent);\n\n // -------- Record Logs --------\n // Record all the transaction logs\n function recordLogs() external;\n\n // Gets all the recorded logs\n function getRecordedLogs() external returns (Log[] memory logs);\n\n // -------- Gas Metering --------\n // It's recommend to use the `noGasMetering` modifier included with forge-std, instead of\n // using these functions directly.\n\n // Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n function pauseGasMetering() external;\n\n // Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n function resumeGasMetering() external;\n\n // -------- RPC Methods --------\n\n /// Gets all the logs according to specified filter.\n function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n external\n returns (EthGetLogs[] memory logs);\n\n // Performs an Ethereum JSON-RPC request to the current fork URL.\n function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n // ======== Test Configuration ========\n\n // If the condition is false, discard this run's fuzz inputs and generate new ones.\n function assume(bool condition) external pure;\n\n // Writes a breakpoint to jump to in the debugger\n function breakpoint(string calldata char) external;\n\n // Writes a conditional breakpoint to jump to in the debugger\n function breakpoint(string calldata char, bool value) external;\n\n // Returns the RPC url for the given alias\n function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n // Returns all rpc urls and their aliases `[alias, url][]`\n function rpcUrls() external view returns (string[2][] memory urls);\n\n // Returns all rpc urls and their aliases as structs.\n function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n // Suspends execution of the main thread for `duration` milliseconds\n function sleep(uint256 duration) external;\n\n // ======== OS and Filesystem ========\n\n // -------- Metadata --------\n\n // Returns true if the given path points to an existing entity, else returns false\n function exists(string calldata path) external returns (bool result);\n\n // Given a path, query the file system to get information about a file, directory, etc.\n function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n // Returns true if the path exists on disk and is pointing at a directory, else returns false\n function isDir(string calldata path) external returns (bool result);\n\n // Returns true if the path exists on disk and is pointing at a regular file, else returns false\n function isFile(string calldata path) external returns (bool result);\n\n // Get the path of the current project root.\n function projectRoot() external view returns (string memory path);\n\n // Returns the time since unix epoch in milliseconds\n function unixTime() external returns (uint256 milliseconds);\n\n // -------- Reading and writing --------\n\n // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n // `path` is relative to the project root.\n function closeFile(string calldata path) external;\n\n // Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n // On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n // Both `from` and `to` are relative to the project root.\n function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n // Creates a new, empty directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - User lacks permissions to modify `path`.\n // - A parent of the given path doesn't exist and `recursive` is false.\n // - `path` already exists and `recursive` is false.\n // `path` is relative to the project root.\n function createDir(string calldata path, bool recursive) external;\n\n // Reads the directory at the given path recursively, up to `max_depth`.\n // `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned.\n // Follows symbolic links if `follow_links` is true.\n function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n external\n view\n returns (DirEntry[] memory entries);\n\n // Reads the entire content of file to string. `path` is relative to the project root.\n function readFile(string calldata path) external view returns (string memory data);\n\n // Reads the entire content of file as binary. `path` is relative to the project root.\n function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n // Reads next line of file to string.\n function readLine(string calldata path) external view returns (string memory line);\n\n // Reads a symbolic link, returning the path that the link points to.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` is not a symbolic link.\n // - `path` does not exist.\n function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n // Removes a directory at the provided path.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` doesn't exist.\n // - `path` isn't a directory.\n // - User lacks permissions to modify `path`.\n // - The directory is not empty and `recursive` is false.\n // `path` is relative to the project root.\n function removeDir(string calldata path, bool recursive) external;\n\n // Removes a file from the filesystem.\n // This cheatcode will revert in the following situations, but is not limited to just these cases:\n // - `path` points to a directory.\n // - The file doesn't exist.\n // - The user lacks permissions to remove the file.\n // `path` is relative to the project root.\n function removeFile(string calldata path) external;\n\n // Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFile(string calldata path, string calldata data) external;\n\n // Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n // `path` is relative to the project root.\n function writeFileBinary(string calldata path, bytes calldata data) external;\n\n // Writes line to file, creating a file if it does not exist.\n // `path` is relative to the project root.\n function writeLine(string calldata path, string calldata data) external;\n\n // -------- Foreign Function Interface --------\n\n // Performs a foreign function call via the terminal\n function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr\n function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n // ======== Environment Variables ========\n\n // Sets environment variables\n function setEnv(string calldata name, string calldata value) external;\n\n // Reads environment variables, (name) => (value)\n function envBool(string calldata name) external view returns (bool value);\n function envUint(string calldata name) external view returns (uint256 value);\n function envInt(string calldata name) external view returns (int256 value);\n function envAddress(string calldata name) external view returns (address value);\n function envBytes32(string calldata name) external view returns (bytes32 value);\n function envString(string calldata name) external view returns (string memory value);\n function envBytes(string calldata name) external view returns (bytes memory value);\n\n // Reads environment variables as arrays\n function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n // Read environment variables with default value\n function envOr(string calldata name, bool defaultValue) external returns (bool value);\n function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);\n function envOr(string calldata name, int256 defaultValue) external returns (int256 value);\n function envOr(string calldata name, address defaultValue) external returns (address value);\n function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);\n function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);\n function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);\n\n // Read environment variables as arrays with default value\n function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n external\n returns (bool[] memory value);\n function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n external\n returns (uint256[] memory value);\n function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n external\n returns (int256[] memory value);\n function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n external\n returns (address[] memory value);\n function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n external\n returns (bytes32[] memory value);\n function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n external\n returns (string[] memory value);\n function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n external\n returns (bytes[] memory value);\n\n // ======== User Management ========\n\n // Derives a private key from the name, labels the account with that name, and returns the wallet\n function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key and returns the wallet\n function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n // Generates a wallet from the private key, labels the account with that name, and returns the wallet\n function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n // Gets the label for the specified address\n function getLabel(address account) external returns (string memory currentLabel);\n\n // Get nonce for a Wallet.\n // See `getNonce(address account)` for an alternative way to get a nonce.\n function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n // Labels an address in call traces\n function label(address account, string calldata newLabel) external;\n\n // Signs data, (Wallet, digest) => (v, r, s)\n function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n // ======== Scripts ========\n\n // -------- Broadcasting Transactions --------\n\n // Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain\n function broadcast() external;\n\n // Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain\n function broadcast(address signer) external;\n\n // Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain\n function broadcast(uint256 privateKey) external;\n\n // Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain\n function startBroadcast() external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain\n function startBroadcast(address signer) external;\n\n // Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain\n function startBroadcast(uint256 privateKey) external;\n\n // Stops collecting onchain transactions\n function stopBroadcast() external;\n\n // -------- Key Management --------\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index}\n function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n // Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index}\n function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n external\n pure\n returns (uint256 privateKey);\n\n // Adds a private key to the local forge wallet and returns the address\n function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n // ======== Utilities ========\n\n // Convert values to a string\n function toString(address value) external pure returns (string memory stringifiedValue);\n function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n function toString(bool value) external pure returns (string memory stringifiedValue);\n function toString(uint256 value) external pure returns (string memory stringifiedValue);\n function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n // Convert values from a string\n function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n // Gets the creation bytecode from an artifact file. Takes in the relative path to the json file\n function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n // Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file\n function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n // ======== JSON Parsing and Manipulation ========\n\n // -------- Reading --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the\n // limitations and caveats of the JSON parsing cheats.\n\n // Checks if a key exists in a JSON object.\n function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n // Given a string of JSON, return it as ABI-encoded\n function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n // The following parseJson cheatcodes will do type coercion, for the type that they indicate.\n // For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12'\n // and hex numbers '0xEF'.\n // Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not\n // a JSON object.\n function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n function parseJsonAddressArray(string calldata json, string calldata key)\n external\n pure\n returns (address[] memory);\n function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n function parseJsonBytes32Array(string calldata json, string calldata key)\n external\n pure\n returns (bytes32[] memory);\n\n // Returns array of keys for a JSON object\n function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n // -------- Writing --------\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how\n // to use the serialization cheats.\n\n // Serialize a key and value to a JSON object stored in-memory that can be later written to a file\n // It returns the stringified version of the specific JSON file up to that moment.\n function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n external\n returns (string memory json);\n\n function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n external\n returns (string memory json);\n function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n external\n returns (string memory json);\n function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n external\n returns (string memory json);\n function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n external\n returns (string memory json);\n function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n external\n returns (string memory json);\n function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n external\n returns (string memory json);\n function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n external\n returns (string memory json);\n\n // NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how\n // to use the JSON writing cheats.\n\n // Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n function writeJson(string calldata json, string calldata path) external;\n\n // Write a serialized JSON object to an **existing** JSON file, replacing a value with key = \n // This is useful to replace a specific value of a JSON file, without having to parse the entire thing\n function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n}\n\n// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n // ======== EVM ========\n\n // -------- Block and Transaction Properties --------\n\n // Sets block.chainid\n function chainId(uint256 newChainId) external;\n\n // Sets block.coinbase\n function coinbase(address newCoinbase) external;\n\n // Sets block.difficulty\n // Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n // If used on unsupported EVM versions it will revert.\n function difficulty(uint256 newDifficulty) external;\n\n // Sets block.basefee\n function fee(uint256 newBasefee) external;\n\n // Sets block.prevrandao\n // Not available on EVM versions before Paris. Use `difficulty` instead.\n // If used on unsupported EVM versions it will revert.\n function prevrandao(bytes32 newPrevrandao) external;\n\n // Sets block.height\n function roll(uint256 newHeight) external;\n\n // Sets tx.gasprice\n function txGasPrice(uint256 newGasPrice) external;\n\n // Sets block.timestamp\n function warp(uint256 newTimestamp) external;\n\n // -------- Account State --------\n\n // Sets an address' balance\n function deal(address account, uint256 newBalance) external;\n\n // Sets an address' code\n function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n // Load a genesis JSON file's `allocs` into the in-memory state.\n function loadAllocs(string calldata pathToAllocsJson) external;\n\n // Resets the nonce of an account to 0 for EOAs and 1 for contract accounts\n function resetNonce(address account) external;\n\n // Sets the nonce of an account; must be higher than the current nonce of the account\n function setNonce(address account, uint64 newNonce) external;\n\n // Sets the nonce of an account to an arbitrary value\n function setNonceUnsafe(address account, uint64 newNonce) external;\n\n // Stores a value to an address' storage slot.\n function store(address target, bytes32 slot, bytes32 value) external;\n\n // -------- Call Manipulation --------\n // --- Mocks ---\n\n // Clears all mocked calls\n function clearMockedCalls() external;\n\n // Mocks a call to an address, returning specified data.\n // Calldata can either be strict or a partial match, e.g. if you only\n // pass a Solidity selector to the expected calldata, then the entire Solidity\n // function will be mocked.\n function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n // Mocks a call to an address with a specific msg.value, returning specified data.\n // Calldata match takes precedence over msg.value in case of ambiguity.\n function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n // Reverts a call to an address with specified revert data.\n function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n // Reverts a call to an address with a specific msg.value, with specified revert data.\n function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n external;\n\n // --- Impersonation (pranks) ---\n\n // Sets the *next* call's msg.sender to be the input address\n function prank(address msgSender) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called\n function startPrank(address msgSender) external;\n\n // Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input\n function prank(address msgSender, address txOrigin) external;\n\n // Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input\n function startPrank(address msgSender, address txOrigin) external;\n\n // Resets subsequent calls' msg.sender to be `address(this)`\n function stopPrank() external;\n\n // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification\n function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n // -------- State Snapshots --------\n\n // Snapshot the current state of the evm.\n // Returns the id of the snapshot that was created.\n // To revert a snapshot use `revertTo`\n function snapshot() external returns (uint256 snapshotId);\n\n // Revert the state of the EVM to a previous snapshot\n // Takes the snapshot id to revert to.\n // This deletes the snapshot and all snapshots taken after the given snapshot id.\n function revertTo(uint256 snapshotId) external returns (bool success);\n\n // -------- Forking --------\n // --- Creation and Selection ---\n\n // Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n function activeFork() external view returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork\n function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction,\n // and returns the identifier of the fork\n function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n // Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before\n // the transaction, returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n // Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork\n function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n // Updates the currently active fork to given block number\n // This is similar to `roll` but for the currently active fork\n function rollFork(uint256 blockNumber) external;\n\n // Updates the currently active fork to given transaction\n // this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block\n function rollFork(bytes32 txHash) external;\n\n // Updates the given fork to given block number\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n // Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block\n function rollFork(uint256 forkId, bytes32 txHash) external;\n\n // Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n function selectFork(uint256 forkId) external;\n\n // Fetches the given transaction from the active fork and executes it on the current state\n function transact(bytes32 txHash) external;\n\n // Fetches the given transaction from the given fork and executes it on the current state\n function transact(uint256 forkId, bytes32 txHash) external;\n\n // --- Behavior ---\n\n // In forking mode, explicitly grant the given address cheatcode access\n function allowCheatcodes(address account) external;\n\n // Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n // Meaning, changes made to the state of this account will be kept when switching forks\n function makePersistent(address account) external;\n function makePersistent(address account0, address account1) external;\n function makePersistent(address account0, address account1, address account2) external;\n function makePersistent(address[] calldata accounts) external;\n\n // Revokes persistent status from the address, previously added via `makePersistent`\n function revokePersistent(address account) external;\n function revokePersistent(address[] calldata accounts) external;\n\n // Returns true if the account is marked as persistent\n function isPersistent(address account) external view returns (bool persistent);\n\n // ======== Test Assertions and Utilities ========\n\n // Expects a call to an address with the specified calldata.\n // Calldata can either be a strict or a partial match\n function expectCall(address callee, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified calldata.\n function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n // Expects a call to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value and calldata\n function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n // Expects given number of calls to an address with the specified msg.value, gas, and calldata.\n function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n // Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n // Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas.\n function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n external;\n\n // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData).\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n external;\n\n // Prepare an expected log with all topic and data checks enabled.\n // Call this function, then emit an event, then call a function. Internally after the call, we check if\n // logs were emitted in the expected order with the expected topics and data.\n function expectEmit() external;\n\n // Same as the previous method, but also checks supplied address against emitting contract.\n function expectEmit(address emitter) external;\n\n // Expects an error on next call that exactly matches the revert data.\n function expectRevert(bytes calldata revertData) external;\n\n // Expects an error on next call that starts with the revert data.\n function expectRevert(bytes4 revertData) external;\n\n // Expects an error on next call with any revert data.\n function expectRevert() external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n // memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n function expectSafeMemory(uint64 min, uint64 max) external;\n\n // Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n // If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n // to the set.\n function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n // Marks a test as skipped. Must be called at the top of the test.\n function skip(bool skipTest) external;\n}\n" + }, + "solady/src/utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Gas optimized ECDSA wrapper.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)\n///\n/// @dev Note:\n/// - The recovery functions use the ecrecover precompile (0x1).\n/// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure.\n/// This is for more safety by default.\n/// Use the `tryRecover` variants if you need to get the zero address back\n/// upon recovery failure instead.\n/// - As of Solady version 0.0.134, all `bytes signature` variants accept both\n/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures.\n/// See: https://eips.ethereum.org/EIPS/eip-2098\n/// This is for calldata efficiency on smart accounts prevalent on L2s.\n///\n/// WARNING! Do NOT use signatures as unique identifiers:\n/// - Use a nonce in the digest to prevent replay attacks on the same contract.\n/// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts.\n/// EIP-712 also enables readable signing of typed data for better user safety.\n/// This implementation does NOT check if a signature is non-malleable.\nlibrary ECDSA {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The signature is invalid.\n error InvalidSignature();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* RECOVERY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recover(bytes32 hash, bytes memory signature) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function recoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n result :=\n mload(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x01, // Start of output.\n 0x20 // Size of output.\n )\n )\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n if iszero(returndatasize()) {\n mstore(0x00, 0x8baa579f) // `InvalidSignature()`.\n revert(0x1c, 0x04)\n }\n mstore(0x60, 0) // Restore the zero slot.\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* TRY-RECOVER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // WARNING!\n // These functions will NOT revert upon recovery failure.\n // Instead, they will return the zero address upon recovery failure.\n // It is critical that the returned address is NEVER compared against\n // a zero address (e.g. an uninitialized address variable).\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecover(bytes32 hash, bytes memory signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n for {} 1 {} {\n mstore(0x00, hash)\n mstore(0x40, mload(add(signature, 0x20))) // `r`.\n if eq(mload(signature), 64) {\n let vs := mload(add(signature, 0x40))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(mload(signature), 65) {\n mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`.\n mstore(0x60, mload(add(signature, 0x40))) // `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`, and the `signature`.\n function tryRecoverCalldata(bytes32 hash, bytes calldata signature)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := 1\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n for {} 1 {} {\n if eq(signature.length, 64) {\n let vs := calldataload(add(signature.offset, 0x20))\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, calldataload(signature.offset)) // `r`.\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n break\n }\n if eq(signature.length, 65) {\n mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`.\n calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`.\n break\n }\n result := 0\n break\n }\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n result, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the EIP-2098 short form signature defined by `r` and `vs`.\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, add(shr(255, vs), 27)) // `v`.\n mstore(0x40, r)\n mstore(0x60, shr(1, shl(1, vs))) // `s`.\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /// @dev Recovers the signer's address from a message digest `hash`,\n /// and the signature defined by `v`, `r`, `s`.\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n internal\n view\n returns (address result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x00, hash)\n mstore(0x20, and(v, 0xff))\n mstore(0x40, r)\n mstore(0x60, s)\n pop(\n staticcall(\n gas(), // Amount of gas left for the transaction.\n 1, // Address of `ecrecover`.\n 0x00, // Start of input.\n 0x80, // Size of input.\n 0x40, // Start of output.\n 0x20 // Size of output.\n )\n )\n mstore(0x60, 0) // Restore the zero slot.\n // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.\n result := mload(xor(0x60, returndatasize()))\n mstore(0x40, m) // Restore the free memory pointer.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an Ethereum Signed Message, created from a `hash`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, hash) // Store into scratch space for keccak256.\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\") // 28 bytes.\n result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`.\n }\n }\n\n /// @dev Returns an Ethereum Signed Message, created from `s`.\n /// This produces a hash corresponding to the one signed with the\n /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign)\n /// JSON-RPC method as part of EIP-191.\n /// Note: Supports lengths of `s` up to 999999 bytes.\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) {\n /// @solidity memory-safe-assembly\n assembly {\n let sLength := mload(s)\n let o := 0x20\n mstore(o, \"\\x19Ethereum Signed Message:\\n\") // 26 bytes, zero-right-padded.\n mstore(0x00, 0x00)\n // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`.\n for { let temp := sLength } 1 {} {\n o := sub(o, 1)\n mstore8(o, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n if iszero(temp) { break }\n }\n let n := sub(0x3a, o) // Header length: `26 + 32 - o`.\n // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes.\n returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20))\n mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header.\n result := keccak256(add(s, sub(0x20, n)), add(n, sLength))\n mstore(s, sLength) // Restore the length.\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EMPTY CALLDATA HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns an empty calldata bytes.\n function emptySignature() internal pure returns (bytes calldata signature) {\n /// @solidity memory-safe-assembly\n assembly {\n signature.length := 0\n }\n }\n}\n" + }, + "solady/src/utils/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Contract for EIP-712 typed structured data hashing and signing.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/EIP712.sol)\n/// @author Modified from Solbase (https://github.com/Sol-DAO/solbase/blob/main/src/utils/EIP712.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)\n///\n/// @dev Note, this implementation:\n/// - Uses `address(this)` for the `verifyingContract` field.\n/// - Does NOT use the optional EIP-712 salt.\n/// - Does NOT use any EIP-712 extensions.\n/// This is for simplicity and to save gas.\n/// If you need to customize, please fork / modify accordingly.\nabstract contract EIP712 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS AND IMMUTABLES */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant _DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n uint256 private immutable _cachedThis;\n uint256 private immutable _cachedChainId;\n bytes32 private immutable _cachedNameHash;\n bytes32 private immutable _cachedVersionHash;\n bytes32 private immutable _cachedDomainSeparator;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTRUCTOR */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Cache the hashes for cheaper runtime gas costs.\n /// In the case of upgradeable contracts (i.e. proxies),\n /// or if the chain id changes due to a hard fork,\n /// the domain separator will be seamlessly calculated on-the-fly.\n constructor() {\n _cachedThis = uint256(uint160(address(this)));\n _cachedChainId = block.chainid;\n\n string memory name;\n string memory version;\n if (!_domainNameAndVersionMayChange()) (name, version) = _domainNameAndVersion();\n bytes32 nameHash = _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(name));\n bytes32 versionHash =\n _domainNameAndVersionMayChange() ? bytes32(0) : keccak256(bytes(version));\n _cachedNameHash = nameHash;\n _cachedVersionHash = versionHash;\n\n bytes32 separator;\n if (!_domainNameAndVersionMayChange()) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), nameHash)\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n _cachedDomainSeparator = separator;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* FUNCTIONS TO OVERRIDE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Please override this function to return the domain name and version.\n /// ```\n /// function _domainNameAndVersion()\n /// internal\n /// pure\n /// virtual\n /// returns (string memory name, string memory version)\n /// {\n /// name = \"Solady\";\n /// version = \"1\";\n /// }\n /// ```\n ///\n /// Note: If the returned result may change after the contract has been deployed,\n /// you must override `_domainNameAndVersionMayChange()` to return true.\n function _domainNameAndVersion()\n internal\n view\n virtual\n returns (string memory name, string memory version);\n\n /// @dev Returns if `_domainNameAndVersion()` may change\n /// after the contract has been deployed (i.e. after the constructor).\n /// Default: false.\n function _domainNameAndVersionMayChange() internal pure virtual returns (bool result) {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HASHING OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _domainSeparator() internal view virtual returns (bytes32 separator) {\n if (_domainNameAndVersionMayChange()) {\n separator = _buildDomainSeparator();\n } else {\n separator = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) separator = _buildDomainSeparator();\n }\n }\n\n /// @dev Returns the hash of the fully encoded EIP-712 message for this domain,\n /// given `structHash`, as defined in\n /// https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct.\n ///\n /// The hash can be used together with {ECDSA-recover} to obtain the signer of a message:\n /// ```\n /// bytes32 digest = _hashTypedData(keccak256(abi.encode(\n /// keccak256(\"Mail(address to,string contents)\"),\n /// mailTo,\n /// keccak256(bytes(mailContents))\n /// )));\n /// address signer = ECDSA.recover(digest, signature);\n /// ```\n function _hashTypedData(bytes32 structHash) internal view virtual returns (bytes32 digest) {\n // We will use `digest` to store the domain separator to save a bit of gas.\n if (_domainNameAndVersionMayChange()) {\n digest = _buildDomainSeparator();\n } else {\n digest = _cachedDomainSeparator;\n if (_cachedDomainSeparatorInvalidated()) digest = _buildDomainSeparator();\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the digest.\n mstore(0x00, 0x1901000000000000) // Store \"\\x19\\x01\".\n mstore(0x1a, digest) // Store the domain separator.\n mstore(0x3a, structHash) // Store the struct hash.\n digest := keccak256(0x18, 0x42)\n // Restore the part of the free memory slot that was overwritten.\n mstore(0x3a, 0)\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EIP-5267 OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev See: https://eips.ethereum.org/EIPS/eip-5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n fields = hex\"0f\"; // `0b01111`.\n (name, version) = _domainNameAndVersion();\n chainId = block.chainid;\n verifyingContract = address(this);\n salt = salt; // `bytes32(0)`.\n extensions = extensions; // `new uint256[](0)`.\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the EIP-712 domain separator.\n function _buildDomainSeparator() private view returns (bytes32 separator) {\n // We will use `separator` to store the name hash to save a bit of gas.\n bytes32 versionHash;\n if (_domainNameAndVersionMayChange()) {\n (string memory name, string memory version) = _domainNameAndVersion();\n separator = keccak256(bytes(name));\n versionHash = keccak256(bytes(version));\n } else {\n separator = _cachedNameHash;\n versionHash = _cachedVersionHash;\n }\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Load the free memory pointer.\n mstore(m, _DOMAIN_TYPEHASH)\n mstore(add(m, 0x20), separator) // Name hash.\n mstore(add(m, 0x40), versionHash)\n mstore(add(m, 0x60), chainid())\n mstore(add(m, 0x80), address())\n separator := keccak256(m, 0xa0)\n }\n }\n\n /// @dev Returns if the cached domain separator has been invalidated.\n function _cachedDomainSeparatorInvalidated() private view returns (bool result) {\n uint256 cachedChainId = _cachedChainId;\n uint256 cachedThis = _cachedThis;\n /// @solidity memory-safe-assembly\n assembly {\n result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))\n }\n }\n}\n" + }, + "solady/src/utils/LibClone.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Minimal proxy library.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)\n/// @author Minimal proxy by 0age (https://github.com/0age)\n/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie\n/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)\n/// @author Minimal ERC1967 proxy by jtriley-eth (https://github.com/jtriley-eth/minimum-viable-proxy)\n///\n/// @dev Minimal proxy:\n/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,\n/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,\n/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.\n///\n/// @dev Minimal proxy (PUSH0 variant):\n/// This is a new minimal proxy that uses the PUSH0 opcode introduced during Shanghai.\n/// It is optimized first for minimal runtime gas, then for minimal bytecode.\n/// The PUSH0 clone functions are intentionally postfixed with a jarring \"_PUSH0\" as\n/// many EVM chains may not support the PUSH0 opcode in the early months after Shanghai.\n/// Please use with caution.\n///\n/// @dev Clones with immutable args (CWIA):\n/// The implementation of CWIA here implements a `receive()` method that emits the\n/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,\n/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards\n/// composability. The minimal proxy implementation does not offer this feature.\n///\n/// @dev Minimal ERC1967 proxy:\n/// An minimal ERC1967 proxy, intended to be upgraded with UUPS.\n/// This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n///\n/// @dev ERC1967I proxy:\n/// An variant of the minimal ERC1967 proxy, with a special code path that activates\n/// if `calldatasize() == 1`. This code path skips the delegatecall and directly returns the\n/// `implementation` address. The returned implementation is guaranteed to be valid if the\n/// keccak256 of the proxy's code is equal to `ERC1967I_CODE_HASH`.\nlibrary LibClone {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CONSTANTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The keccak256 of the deployed code for the ERC1967 proxy.\n bytes32 internal constant ERC1967_CODE_HASH =\n 0xaaa52c8cc8a0e3fd27ce756cc6b4e70c51423e9b597b11f32d3e49f8b1fc890d;\n\n /// @dev The keccak256 of the deployed code for the ERC1967I proxy.\n bytes32 internal constant ERC1967I_CODE_HASH =\n 0xce700223c0d4cea4583409accfc45adac4a093b3519998a9cbbe1504dadba6f7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Unable to deploy the clone.\n error DeploymentFailed();\n\n /// @dev The salt must start with either the zero address or `by`.\n error SaltDoesNotStartWith();\n\n /// @dev The ETH transfer has failed.\n error ETHTransferFailed();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a clone of `implementation`.\n function clone(address implementation) internal returns (address instance) {\n instance = clone(0, implementation);\n }\n\n /// @dev Deploys a clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (44 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | |\n * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | |\n * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x2a | PUSH1 0x2a | 0x2a success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create(value, 0x0c, 0x35)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n function cloneDeterministic(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n instance := create2(value, 0x0c, 0x35, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the clone of `implementation`.\n function initCode(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d3d93803e602a57fd5bf30000000000000000000000)\n mstore(add(result, 0x28), implementation)\n mstore(add(result, 0x14), 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n mstore(result, 0x35) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)\n mstore(0x14, implementation)\n mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)\n hash := keccak256(0x0c, 0x35)\n mstore(0x21, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n bytes32 hash = initCodeHash(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL PROXY OPERATIONS (PUSH0 VARIANT) */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n function clone_PUSH0(address implementation) internal returns (address instance) {\n instance = clone_PUSH0(0, implementation);\n }\n\n /// @dev Deploys a PUSH0 clone of `implementation`.\n /// Deposits `value` ETH during deployment.\n function clone_PUSH0(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * --------------------------------------------------------------------------+\n * CREATION (9 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 5f | PUSH0 | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 5f | PUSH0 | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * --------------------------------------------------------------------------|\n * RUNTIME (45 bytes) |\n * --------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * --------------------------------------------------------------------------|\n * |\n * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |\n * 5f | PUSH0 | 0 | |\n * 5f | PUSH0 | 0 0 | |\n * |\n * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | |\n * 5f | PUSH0 | 0 cds 0 0 | |\n * 5f | PUSH0 | 0 0 cds 0 0 | |\n * 37 | CALLDATACOPY | 0 0 | [0..cds): calldata |\n * |\n * ::: delegate call to the implementation contract :::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds 0 0 | [0..cds): calldata |\n * 5f | PUSH0 | 0 cds 0 0 | [0..cds): calldata |\n * 73 addr | PUSH20 addr | addr 0 cds 0 0 | [0..cds): calldata |\n * 5a | GAS | gas addr 0 cds 0 0 | [0..cds): calldata |\n * f4 | DELEGATECALL | success | [0..cds): calldata |\n * |\n * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 rds success | [0..cds): calldata |\n * 5f | PUSH0 | 0 0 rds success | [0..cds): calldata |\n * 3e | RETURNDATACOPY | success | [0..rds): returndata |\n * |\n * 60 0x29 | PUSH1 0x29 | 0x29 success | [0..rds): returndata |\n * 57 | JUMPI | | [0..rds): returndata |\n * |\n * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..rds): returndata |\n * 3d | RETURNDATASIZE | rds | [0..rds): returndata |\n * 5f | PUSH0 | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * --------------------------------------------------------------------------+\n */\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create(value, 0x0e, 0x36)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n function cloneDeterministic_PUSH0(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic_PUSH0(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic PUSH0 clone of `implementation` with `salt`.\n /// Deposits `value` ETH during deployment.\n function cloneDeterministic_PUSH0(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n instance := create2(value, 0x0e, 0x36, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the initialization code of the PUSH0 clone of `implementation`.\n function initCode_PUSH0(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(add(result, 0x40), 0x5af43d5f5f3e6029573d5ffd5b3d5ff300000000000000000000) // 16\n mstore(add(result, 0x26), implementation) // 20\n mstore(add(result, 0x12), 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n mstore(result, 0x36) // Store the length.\n mstore(0x40, add(result, 0x60)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the PUSH0 clone of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash_PUSH0(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3) // 16\n mstore(0x14, implementation) // 20\n mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73) // 9 + 9\n hash := keccak256(0x0e, 0x36)\n mstore(0x24, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Returns the address of the deterministic PUSH0 clone of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress_PUSH0(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash_PUSH0(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CLONES WITH IMMUTABLE ARGS OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This implementation of CWIA differs from the original implementation.\n // If the calldata is empty, it will emit a `ReceiveETH(uint256)` event and skip the `DELEGATECALL`.\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n function clone(address implementation, bytes memory data) internal returns (address instance) {\n instance = clone(0, implementation, data);\n }\n\n /// @dev Deploys a clone of `implementation` with immutable arguments encoded in `data`.\n /// Deposits `value` ETH during deployment.\n function clone(uint256 value, address implementation, bytes memory data)\n internal\n returns (address instance)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n // The `creationSize` is `extraLength + 108`\n // The `runSize` is `creationSize - 10`.\n\n /**\n * ---------------------------------------------------------------------------------------------------+\n * CREATION (10 bytes) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * 61 runSize | PUSH2 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------------------------|\n * RUNTIME (98 bytes + extraLength) |\n * ---------------------------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------------------------|\n * |\n * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 60 0x2c | PUSH1 0x2c | 0x2c cds | |\n * 57 | JUMPI | | |\n * 34 | CALLVALUE | cv | |\n * 3d | RETURNDATASIZE | 0 cv | |\n * 52 | MSTORE | | [0..0x20): callvalue |\n * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue |\n * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue |\n * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue |\n * a1 | LOG1 | | [0..0x20): callvalue |\n * 00 | STOP | | [0..0x20): callvalue |\n * 5b | JUMPDEST | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..cds): calldata |\n * |\n * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |\n * 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |\n * 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |\n * |\n * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |\n * 60 0x62 | PUSH1 0x62 | 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 36 | CALLDATASIZE | cds 0x62 e e 0 0 0 0 | [0..cds): calldata |\n * 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * |\n * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |\n * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |\n * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |\n * |\n * 60 0x60 | PUSH1 0x60 | 0x60 success 0 rds | [0..rds): returndata |\n * 57 | JUMPI | 0 rds | [0..rds): returndata |\n * |\n * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * fd | REVERT | | [0..rds): returndata |\n * |\n * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | 0 rds | [0..rds): returndata |\n * f3 | RETURN | | [0..rds): returndata |\n * ---------------------------------------------------------------------------------------------------+\n */\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create(value, sub(data, 0x4c), add(extraLength, 0x6c))\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = cloneDeterministic(0, implementation, data, salt);\n }\n\n /// @dev Deploys a deterministic clone of `implementation`\n /// with immutable arguments encoded in `data` and `salt`.\n function cloneDeterministic(\n uint256 value,\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address instance) {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n // Do a out-of-gas revert if `extraLength` is too big. 0xffff - 0x62 + 0x01 = 0xff9e.\n // The actual EVM limit may be smaller and may change over time.\n sub(data, add(0x59, lt(extraLength, 0xff9e))),\n or(shl(0x78, add(extraLength, 0x62)), 0xfd6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n instance := create2(value, sub(data, 0x4c), add(extraLength, 0x6c), salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n function initCode(address implementation, bytes memory data)\n internal\n pure\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n let dataLength := mload(data)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n let o := add(result, 0x8c)\n let end := add(o, dataLength)\n\n // Copy the `data` into `result`.\n for { let d := sub(add(data, 0x20), o) } 1 {} {\n mstore(o, mload(add(o, d)))\n o := add(o, 0x20)\n if iszero(lt(o, end)) { break }\n }\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(add(result, 0x6c), 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(add(result, 0x5f), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n add(result, 0x4b),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n add(result, 0x32),\n 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n add(result, 0x12),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(end, shl(0xf0, extraLength))\n mstore(add(end, 0x02), 0) // Zeroize the slot after the result.\n mstore(result, add(extraLength, 0x6c)) // Store the length.\n mstore(0x40, add(0x22, end)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the clone of `implementation`\n /// using immutable arguments encoded in `data`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHash(address implementation, bytes memory data)\n internal\n pure\n returns (bytes32 hash)\n {\n assembly {\n // Compute the boundaries of the data and cache the memory slots around it.\n let mBefore3 := mload(sub(data, 0x60))\n let mBefore2 := mload(sub(data, 0x40))\n let mBefore1 := mload(sub(data, 0x20))\n let dataLength := mload(data)\n let dataEnd := add(add(data, 0x20), dataLength)\n let mAfter1 := mload(dataEnd)\n\n // Do a out-of-gas revert if `dataLength` is too big. 0xffff - 0x02 - 0x62 = 0xff9b.\n // The actual EVM limit may be smaller and may change over time.\n returndatacopy(returndatasize(), returndatasize(), gt(dataLength, 0xff9b))\n\n // +2 bytes for telling how much data there is appended to the call.\n let extraLength := add(dataLength, 2)\n\n mstore(data, 0x5af43d3d93803e606057fd5bf3) // Write the bytecode before the data.\n mstore(sub(data, 0x0d), implementation) // Write the address of the implementation.\n // Write the rest of the bytecode.\n mstore(\n sub(data, 0x21),\n or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)\n )\n // `keccak256(\"ReceiveETH(uint256)\")`\n mstore(\n sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff\n )\n mstore(\n sub(data, 0x5a),\n or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)\n )\n mstore(dataEnd, shl(0xf0, extraLength))\n\n hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))\n\n // Restore the overwritten memory surrounding `data`.\n mstore(dataEnd, mAfter1)\n mstore(data, dataLength)\n mstore(sub(data, 0x20), mBefore1)\n mstore(sub(data, 0x40), mBefore2)\n mstore(sub(data, 0x60), mBefore3)\n }\n }\n\n /// @dev Returns the address of the deterministic clone of\n /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(\n address implementation,\n bytes memory data,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHash(implementation, data);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MINIMAL ERC1967 PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: The ERC1967 proxy here is intended to be upgraded with UUPS.\n // This is NOT the same as ERC1967Factory's transparent proxy, which includes admin logic.\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n function deployERC1967(address implementation) internal returns (address instance) {\n instance = deployERC1967(0, implementation);\n }\n\n /// @dev Deploys a minimal ERC1967 proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (61 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x38 | PUSH1 0x38 | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create(value, 0x21, 0x5f)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n function deployDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic minimal ERC1967 proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x21, 0x5f))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x21, 0x5f, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x60),\n 0x3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f300\n )\n mstore(\n add(result, 0x40),\n 0x55f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc\n )\n mstore(add(result, 0x20), or(shl(24, implementation), 0x600951))\n mstore(add(result, 0x09), 0x603d3d8160223d3973)\n mstore(result, 0x5f) // Store the length.\n mstore(0x40, add(result, 0x80)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0xcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3)\n mstore(0x40, 0x5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076)\n mstore(0x20, 0x6009)\n mstore(0x1e, implementation)\n mstore(0x0a, 0x603d3d8160223d3973)\n hash := keccak256(0x21, 0x5f)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967 proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1967I PROXY OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n // Note: This proxy has a special code path that activates if `calldatasize() == 1`.\n // This code path skips the delegatecall and directly returns the `implementation` address.\n // The returned implementation is guaranteed to be valid if the keccak256 of the\n // proxy's code is equal to `ERC1967I_CODE_HASH`.\n\n /// @dev Deploys a minimal ERC1967I proxy with `implementation`.\n function deployERC1967I(address implementation) internal returns (address instance) {\n instance = deployERC1967I(0, implementation);\n }\n\n /// @dev Deploys a ERC1967I proxy with `implementation`.\n /// Deposits `value` ETH during deployment.\n function deployERC1967I(uint256 value, address implementation)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n /**\n * ---------------------------------------------------------------------------------+\n * CREATION (34 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * 60 runSize | PUSH1 runSize | r | |\n * 3d | RETURNDATASIZE | 0 r | |\n * 81 | DUP2 | r 0 r | |\n * 60 offset | PUSH1 offset | o r 0 r | |\n * 3d | RETURNDATASIZE | 0 o r 0 r | |\n * 39 | CODECOPY | 0 r | [0..runSize): runtime code |\n * 73 impl | PUSH20 impl | impl 0 r | [0..runSize): runtime code |\n * 60 slotPos | PUSH1 slotPos | slotPos impl 0 r | [0..runSize): runtime code |\n * 51 | MLOAD | slot impl 0 r | [0..runSize): runtime code |\n * 55 | SSTORE | 0 r | [0..runSize): runtime code |\n * f3 | RETURN | | [0..runSize): runtime code |\n * ---------------------------------------------------------------------------------|\n * RUNTIME (82 bytes) |\n * ---------------------------------------------------------------------------------|\n * Opcode | Mnemonic | Stack | Memory |\n * ---------------------------------------------------------------------------------|\n * |\n * ::: check calldatasize ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 58 | PC | 1 cds | |\n * 14 | EQ | eqs | |\n * 60 0x43 | PUSH1 0x43 | dest eqs | |\n * 57 | JUMPI | | |\n * |\n * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 36 | CALLDATASIZE | cds | |\n * 3d | RETURNDATASIZE | 0 cds | |\n * 3d | RETURNDATASIZE | 0 0 cds | |\n * 37 | CALLDATACOPY | | [0..calldatasize): calldata |\n * |\n * ::: delegatecall to implementation ::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | 0 | |\n * 3d | RETURNDATASIZE | 0 0 | |\n * 36 | CALLDATASIZE | cds 0 0 | [0..calldatasize): calldata |\n * 3d | RETURNDATASIZE | 0 cds 0 0 | [0..calldatasize): calldata |\n * 7f slot | PUSH32 slot | s 0 cds 0 0 | [0..calldatasize): calldata |\n * 54 | SLOAD | i 0 cds 0 0 | [0..calldatasize): calldata |\n * 5a | GAS | g i 0 cds 0 0 | [0..calldatasize): calldata |\n * f4 | DELEGATECALL | succ | [0..calldatasize): calldata |\n * |\n * ::: copy returndata to memory :::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds succ | [0..calldatasize): calldata |\n * 60 0x00 | PUSH1 0x00 | 0 rds succ | [0..calldatasize): calldata |\n * 80 | DUP1 | 0 0 rds succ | [0..calldatasize): calldata |\n * 3e | RETURNDATACOPY | succ | [0..returndatasize): returndata |\n * |\n * ::: branch on delegatecall status :::::::::::::::::::::::::::::::::::::::::::::: |\n * 60 0x3E | PUSH1 0x3E | dest succ | [0..returndatasize): returndata |\n * 57 | JUMPI | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall failed, revert :::::::::::::::::::::::::::::::::::::::::::::::: |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * fd | REVERT | | [0..returndatasize): returndata |\n * |\n * ::: delegatecall succeeded, return ::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | [0..returndatasize): returndata |\n * 3d | RETURNDATASIZE | rds | [0..returndatasize): returndata |\n * 60 0x00 | PUSH1 0x00 | 0 rds | [0..returndatasize): returndata |\n * f3 | RETURN | | [0..returndatasize): returndata |\n * |\n * ::: implementation , return :::::::::::::::::::::::::::::::::::::::::::::::::::: |\n * 5b | JUMPDEST | | |\n * 60 0x20 | PUSH1 0x20 | 32 | |\n * 60 0x0F | PUSH1 0x0F | o 32 | |\n * 3d | RETURNDATASIZE | 0 o 32 | |\n * 39 | CODECOPY | | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 | [0..32): implementation slot |\n * 51 | MLOAD | slot | [0..32): implementation slot |\n * 54 | SLOAD | impl | [0..32): implementation slot |\n * 3d | RETURNDATASIZE | 0 impl | [0..32): implementation slot |\n * 52 | MSTORE | | [0..32): implementation address |\n * 59 | MSIZE | 32 | [0..32): implementation address |\n * 3d | RETURNDATASIZE | 0 32 | [0..32): implementation address |\n * f3 | RETURN | | [0..32): implementation address |\n * |\n * ---------------------------------------------------------------------------------+\n */\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create(value, 0x0c, 0x74)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n function deployDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n instance = deployDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Deploys a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n function deployDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n return createDeterministicERC1967I(0, implementation, salt);\n }\n\n /// @dev Creates a deterministic ERC1967I proxy with `implementation` and `salt`.\n /// Deposits `value` ETH during deployment.\n /// Note: This method is intended for use in ERC4337 factories,\n /// which are expected to NOT revert if the proxy is already deployed.\n function createDeterministicERC1967I(uint256 value, address implementation, bytes32 salt)\n internal\n returns (bool alreadyDeployed, address instance)\n {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n // Compute and store the bytecode hash.\n mstore(add(m, 0x35), keccak256(0x0c, 0x74))\n mstore(m, shl(88, address()))\n mstore8(m, 0xff) // Write the prefix.\n mstore(add(m, 0x15), salt)\n instance := keccak256(m, 0x55)\n for {} 1 {} {\n if iszero(extcodesize(instance)) {\n instance := create2(value, 0x0c, 0x74, salt)\n if iszero(instance) {\n mstore(0x00, 0x30116425) // `DeploymentFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n alreadyDeployed := 1\n if iszero(value) { break }\n if iszero(call(gas(), instance, value, codesize(), 0x00, codesize(), 0x00)) {\n mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`.\n revert(0x1c, 0x04)\n }\n break\n }\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the initialization code of the minimal ERC1967 proxy of `implementation`.\n function initCodeERC1967I(address implementation) internal pure returns (bytes memory result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n mstore(\n add(result, 0x74),\n 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3\n )\n mstore(\n add(result, 0x54),\n 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4\n )\n mstore(add(result, 0x34), 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(add(result, 0x1d), implementation)\n mstore(add(result, 0x09), 0x60523d8160223d3973)\n mstore(add(result, 0x94), 0)\n mstore(result, 0x74) // Store the length.\n mstore(0x40, add(result, 0xa0)) // Allocate memory.\n }\n }\n\n /// @dev Returns the initialization code hash of the minimal ERC1967 proxy of `implementation`.\n /// Used for mining vanity addresses with create2crunch.\n function initCodeHashERC1967I(address implementation) internal pure returns (bytes32 hash) {\n /// @solidity memory-safe-assembly\n assembly {\n let m := mload(0x40) // Cache the free memory pointer.\n mstore(0x60, 0x3d6000803e603e573d6000fd5b3d6000f35b6020600f3d393d51543d52593df3)\n mstore(0x40, 0xa13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af4)\n mstore(0x20, 0x600f5155f3365814604357363d3d373d3d363d7f360894)\n mstore(0x09, or(shl(160, 0x60523d8160223d3973), shr(96, shl(96, implementation))))\n hash := keccak256(0x0c, 0x74)\n mstore(0x40, m) // Restore the free memory pointer.\n mstore(0x60, 0) // Restore the zero slot.\n }\n }\n\n /// @dev Returns the address of the deterministic ERC1967I proxy of `implementation`,\n /// with `salt` by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddressERC1967I(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n bytes32 hash = initCodeHashERC1967I(implementation);\n predicted = predictDeterministicAddress(hash, salt, deployer);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* OTHER OPERATIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the address when a contract with initialization code hash,\n /// `hash`, is deployed with `salt`, by `deployer`.\n /// Note: The returned result has dirty upper 96 bits. Please clean if used in assembly.\n function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)\n internal\n pure\n returns (address predicted)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and store the bytecode hash.\n mstore8(0x00, 0xff) // Write the prefix.\n mstore(0x35, hash)\n mstore(0x01, shl(96, deployer))\n mstore(0x15, salt)\n predicted := keccak256(0x00, 0x55)\n mstore(0x35, 0) // Restore the overwritten part of the free memory pointer.\n }\n }\n\n /// @dev Requires that `salt` starts with either the zero address or `by`.\n function checkStartsWith(bytes32 salt, address by) internal pure {\n /// @solidity memory-safe-assembly\n assembly {\n // If the salt does not start with the zero address or `by`.\n if iszero(or(iszero(shr(96, salt)), eq(shr(96, shl(96, by)), shr(96, salt)))) {\n mstore(0x00, 0x0c4549ef) // `SaltDoesNotStartWith()`.\n revert(0x1c, 0x04)\n }\n }\n }\n}\n" + }, + "src/etherspot-wallet-v1/paymaster/VerifyingPaymaster.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.23;\n\n// @dev eth-infinitism/account-abstraction contract with addition of updating verifying signer.\n\n/* solhint-disable reason-string */\n/* solhint-disable no-inline-assembly */\n\nimport \"../../../account-abstraction/contracts/core/BasePaymaster.sol\";\nimport \"../../../account-abstraction/contracts/core/UserOperationLib.sol\";\nimport \"../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\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 the account-specific signature:\n * - the paymaster checks a signature to agree to PAY for GAS.\n * - the account checks a signature to prove identity and account ownership.\n */\ncontract VerifyingPaymaster is BasePaymaster {\n using UserOperationLib for PackedUserOperation;\n\n address public verifyingSigner;\n\n uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET;\n\n uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64;\n\n event VerifyingSignerUpdated(address newVerifyingSigner);\n\n constructor(\n IEntryPoint _entryPoint,\n address _verifyingSigner\n ) BasePaymaster(_entryPoint) {\n verifyingSigner = _verifyingSigner;\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 PackedUserOperation 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 address sender = userOp.getSender();\n return\n keccak256(\n abi.encode(\n sender,\n userOp.nonce,\n keccak256(userOp.initCode),\n keccak256(userOp.callData),\n userOp.accountGasLimits,\n uint256(\n bytes32(\n userOp\n .paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET]\n )\n ),\n userOp.preVerificationGas,\n userOp.gasFees,\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 PackedUserOperation calldata userOp,\n bytes32 /*userOpHash*/,\n uint256 requiredPreFund\n )\n internal\n view\n override\n returns (bytes memory context, uint256 validationData)\n {\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 \"VerifyingPaymaster\", and not \"ECDSA\"\n require(\n signature.length == 64 || signature.length == 65,\n \"VerifyingPaymaster: invalid signature length in paymasterAndData\"\n );\n bytes32 hash = MessageHashUtils.toEthSignedMessageHash(\n getHash(userOp, validUntil, validAfter)\n );\n\n //don't revert on signature failure: return SIG_VALIDATION_FAILED\n if (verifyingSigner != ECDSA.recover(hash, signature)) {\n return (\"\", _packValidationData(true, validUntil, validAfter));\n }\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 (\"\", _packValidationData(false, validUntil, validAfter));\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:],\n (uint48, uint48)\n );\n signature = paymasterAndData[SIGNATURE_OFFSET:];\n }\n\n function updateVerifyingSigner(\n address _newVerifyingSigner\n ) public onlyOwner {\n verifyingSigner = _newVerifyingSigner;\n emit VerifyingSignerUpdated(_newVerifyingSigner);\n }\n}\n" + }, + "src/modular-etherspot-wallet/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IAccessController} from \"../interfaces/IAccessController.sol\";\nimport {ErrorsLib} from \"../libraries/ErrorsLib.sol\";\n\ncontract AccessController is IAccessController {\n /// State Variables\n uint128 constant MULTIPLY_FACTOR = 1000;\n uint16 constant SIXTY_PERCENT = 600;\n uint24 constant INITIAL_PROPOSAL_TIMELOCK = 24 hours;\n uint256 public ownerCount;\n uint256 public guardianCount;\n uint256 public proposalId;\n uint256 public proposalTimelock;\n\n /// Mappings\n mapping(address => bool) private _owners;\n mapping(address => bool) private _guardians;\n mapping(uint256 => NewOwnerProposal) private _proposals;\n\n /// Modifiers\n modifier onlyOwnerOrSelf() {\n if (!(isOwner(msg.sender) || msg.sender == address(this))) {\n revert ErrorsLib.OnlyOwnerOrSelf();\n }\n _;\n }\n\n modifier onlyGuardian() {\n if (!isGuardian(msg.sender)) {\n revert ErrorsLib.OnlyGuardian();\n }\n _;\n }\n\n modifier onlyOwnerOrGuardianOrSelf() {\n if (\n !(isOwner(msg.sender) ||\n isGuardian(msg.sender) ||\n msg.sender == address(this))\n ) {\n revert ErrorsLib.OnlyOwnerOrGuardianOrSelf();\n }\n _;\n }\n\n /// External\n /**\n * @notice Add owner to the wallet.\n * @dev Only owner or wallet.\n * @param _newOwner address of new owner to add.\n */\n function addOwner(address _newOwner) external onlyOwnerOrSelf {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n _addOwner(_newOwner);\n emit OwnerAdded(address(this), _newOwner);\n }\n\n /**\n * @notice Remove owner from wallet.\n * @dev Only owner or wallet.\n * @param _owner address of wallet owner to remove .\n */\n function removeOwner(address _owner) external onlyOwnerOrSelf {\n if (!isOwner(_owner)) revert ErrorsLib.RemovingInvalidOwner();\n if (ownerCount <= 1) {\n revert ErrorsLib.WalletNeedsOwner();\n }\n _removeOwner(_owner);\n emit OwnerRemoved(address(this), _owner);\n }\n\n /**\n * @notice Add guardian for the wallet.\n * @dev Only owner or wallet.\n * @param _newGuardian address of new guardian to add to wallet.\n */\n function addGuardian(address _newGuardian) external onlyOwnerOrSelf {\n if (\n _newGuardian == address(0) ||\n isGuardian(_newGuardian) ||\n isOwner(_newGuardian)\n ) {\n revert ErrorsLib.AddingInvalidGuardian();\n }\n _addGuardian(_newGuardian);\n emit GuardianAdded(address(this), _newGuardian);\n }\n\n /**\n * @notice Remove guardian from the wallet.\n * @dev Only owner or wallet.\n * @param _guardian address of existing guardian to remove.\n */\n function removeGuardian(address _guardian) external onlyOwnerOrSelf {\n if (!isGuardian(_guardian)) revert ErrorsLib.RemovingInvalidGuardian();\n _removeGuardian(_guardian);\n emit GuardianRemoved(address(this), _guardian);\n }\n\n /**\n * @notice Change the timelock on proposals.\n * The minimum time (secs) that a proposal is allowed to be discarded.\n * @dev Only owner or wallet.\n * @param _newTimelock new timelock in seconds.\n */\n function changeProposalTimelock(\n uint256 _newTimelock\n ) external onlyOwnerOrSelf {\n assembly {\n sstore(proposalTimelock.slot, _newTimelock)\n }\n }\n\n /**\n * @notice Discards the current proposal.\n * @dev Only owner or guardian or wallet. Must be after the proposal timelock is met.\n */\n function discardCurrentProposal() public onlyOwnerOrGuardianOrSelf {\n NewOwnerProposal storage prop = _proposals[proposalId];\n uint256 timelock = proposalTimelock == 0\n ? INITIAL_PROPOSAL_TIMELOCK\n : proposalTimelock;\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n bool allowed = isGuardian(msg.sender);\n if (allowed && (prop.proposedAt + timelock >= block.timestamp))\n revert ErrorsLib.ProposalTimelocked();\n\n prop.resolved = true;\n emit ProposalDiscarded(address(this), proposalId, msg.sender);\n }\n\n /**\n * @notice Creates a new owner proposal (adds new owner to wallet).\n * @dev Only guardian.\n * @param _newOwner the proposed new owner for the wallet.\n */\n function guardianPropose(address _newOwner) external onlyGuardian {\n if (\n _newOwner == address(0) ||\n isGuardian(_newOwner) ||\n isOwner(_newOwner)\n ) {\n revert ErrorsLib.AddingInvalidOwner();\n }\n if (guardianCount < 3) {\n revert ErrorsLib.NotEnoughGuardians();\n }\n NewOwnerProposal storage prop = _proposals[proposalId];\n if (prop.guardiansApproved.length != 0 && !prop.resolved) {\n revert ErrorsLib.ProposalUnresolved();\n }\n uint256 newProposalId = proposalId + 1;\n _proposals[newProposalId].newOwnerProposed = _newOwner;\n _proposals[newProposalId].guardiansApproved.push(msg.sender);\n _proposals[newProposalId].approvalCount++;\n _proposals[newProposalId].resolved = false;\n _proposals[newProposalId].proposedAt = block.timestamp;\n proposalId = newProposalId;\n emit ProposalSubmitted(\n address(this),\n newProposalId,\n _newOwner,\n msg.sender\n );\n }\n\n /**\n * @notice Cosigns a new owner proposal.\n * @dev Only guardian. Must meet minimum threshold of 60% of total guardians to add new owner.\n */\n function guardianCosign() external onlyGuardian {\n uint256 latestId = proposalId;\n NewOwnerProposal storage latestProp = _proposals[latestId];\n if (latestId == 0) {\n revert ErrorsLib.InvalidProposal();\n }\n if (_checkIfSigned(latestId)) {\n revert ErrorsLib.AlreadySignedProposal();\n }\n if (_resolvedProposal()) {\n revert ErrorsLib.ProposalResolved();\n }\n _proposals[latestId].guardiansApproved.push(msg.sender);\n _proposals[latestId].approvalCount++;\n address newOwner = latestProp.newOwnerProposed;\n if (_checkQuorumReached(latestId)) {\n _proposals[latestId].resolved = true;\n _addOwner(newOwner);\n } else {\n emit QuorumNotReached(\n address(this),\n latestId,\n newOwner,\n _proposals[latestId].approvalCount\n );\n }\n }\n\n /// Views\n /**\n * @notice Checks if _address is owner of wallet.\n * @param _address address to check if owner of wallet.\n * @return bool.\n */\n function isOwner(address _address) public view returns (bool) {\n return _owners[_address];\n }\n\n /**\n * @notice Checks if _address is guardian of wallet.\n * @param _address address to check if guardian of wallet.\n * @return bool.\n */\n function isGuardian(address _address) public view returns (bool) {\n return _guardians[_address];\n }\n\n /**\n * @notice Returns new owner proposal data.\n * @param _proposalId proposal id to return data for.\n * @return ownerProposed_ the new owner proposed.\n * @return approvalCount_ number of guardians that have approved the proposal.\n * @return guardiansApproved_ array of guardian addresses that have approved proposal.\n * @return resolved_ bool is the proposal resolved.\n * @return proposedAt_ timestamp of when proposal was initiated.\n */\n function getProposal(\n uint256 _proposalId\n )\n public\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n )\n {\n if (_proposalId == 0 || _proposalId > proposalId) {\n revert ErrorsLib.InvalidProposal();\n }\n NewOwnerProposal memory proposal = _proposals[_proposalId];\n return (\n proposal.newOwnerProposed,\n proposal.approvalCount,\n proposal.guardiansApproved,\n proposal.resolved,\n proposal.proposedAt\n );\n }\n\n /// Internal\n function _addOwner(address _newOwner) internal {\n _owners[_newOwner] = true;\n ownerCount++;\n }\n\n function _addGuardian(address _newGuardian) internal {\n _guardians[_newGuardian] = true;\n guardianCount++;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _removeOwner(address _owner) internal {\n _owners[_owner] = false;\n ownerCount--;\n }\n\n function _removeGuardian(address _guardian) internal {\n _guardians[_guardian] = false;\n guardianCount--;\n if (!_resolvedProposal()) discardCurrentProposal();\n }\n\n function _checkIfSigned(uint256 _proposalId) internal view returns (bool) {\n for (\n uint256 i;\n i < _proposals[_proposalId].guardiansApproved.length;\n i++\n ) {\n if (_proposals[_proposalId].guardiansApproved[i] == msg.sender) {\n return true;\n }\n }\n return false;\n }\n\n function _checkQuorumReached(\n uint256 _proposalId\n ) internal view returns (bool) {\n return ((_proposals[_proposalId].approvalCount * MULTIPLY_FACTOR) /\n guardianCount >=\n SIXTY_PERCENT);\n }\n\n function _resolvedProposal() internal view returns (bool) {\n NewOwnerProposal storage prop = _proposals[proposalId];\n return prop.resolved;\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\n/**\n * @title reference implementation of the minimal modular smart account with Hook Extension\n * @author zeroknots.eth | rhinestone.wtf\n */\ncontract AccountBase {\n error AccountAccessUnauthorized();\n /////////////////////////////////////////////////////\n // Access Control\n ////////////////////////////////////////////////////\n\n modifier onlyEntryPointOrSelf() virtual {\n if (!(msg.sender == entryPoint() || msg.sender == address(this))) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n modifier onlyEntryPoint() virtual {\n if (msg.sender != entryPoint()) {\n revert AccountAccessUnauthorized();\n }\n _;\n }\n\n function entryPoint() public view virtual returns (address) {\n return 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n }\n\n /// @dev Sends to the EntryPoint (i.e. `msg.sender`) the missing funds for this transaction.\n /// Subclass MAY override this modifier for better funds management.\n /// (e.g. send to the EntryPoint more than the minimum required, so that in future transactions\n /// it will not be required to send again)\n ///\n /// `missingAccountFunds` is the minimum value this modifier should send the EntryPoint,\n /// which MAY be zero, in case there is enough deposit, or the userOp has a paymaster.\n modifier payPrefund(uint256 missingAccountFunds) virtual {\n _;\n /// @solidity memory-safe-assembly\n assembly {\n if missingAccountFunds {\n // Ignore failure (it's EntryPoint's job to verify, not the account's).\n pop(\n call(\n gas(),\n caller(),\n missingAccountFunds,\n codesize(),\n 0x00,\n codesize(),\n 0x00\n )\n )\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ExecutionHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * @title Execution\n * @dev This contract executes calls in the context of this contract.\n * @author zeroknots.eth | rhinestone.wtf\n * shoutout to solady (vectorized, ross) for this code\n * https://github.com/Vectorized/solady/blob/main/src/accounts/ERC4337.sol\n */\ncontract ExecutionHelper {\n error ExecutionFailed();\n\n event TryExecuteUnsuccessful(uint256 batchExecutionindex, bytes result);\n\n function _execute(Execution[] calldata executions) internal returns (bytes[] memory result) {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n result[i] = _execute(_exec.target, _exec.value, _exec.callData);\n }\n }\n\n function _tryExecute(Execution[] calldata executions)\n internal\n returns (bytes[] memory result)\n {\n uint256 length = executions.length;\n result = new bytes[](length);\n\n for (uint256 i; i < length; i++) {\n Execution calldata _exec = executions[i];\n bool success;\n (success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);\n if (!success) emit TryExecuteUnsuccessful(i, result[i]);\n }\n }\n\n function _execute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n if iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n function _tryExecute(\n address target,\n uint256 value,\n bytes calldata callData\n )\n internal\n virtual\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n success := call(gas(), target, value, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account.\n function _executeDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n if iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)) {\n // Bubble up the revert if the call reverts.\n returndatacopy(result, 0x00, returndatasize())\n revert(result, returndatasize())\n }\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n\n /// @dev Execute a delegatecall with `delegate` on this account and catch reverts.\n function _tryExecuteDelegatecall(\n address delegate,\n bytes calldata callData\n )\n internal\n returns (bool success, bytes memory result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n result := mload(0x40)\n calldatacopy(result, callData.offset, callData.length)\n // Forwards the `data` to `delegate` via delegatecall.\n success :=\n delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)\n mstore(result, returndatasize()) // Store the length.\n let o := add(result, 0x20)\n returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.\n mstore(0x40, add(o, returndatasize())) // Allocate the memory.\n }\n }\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/HookManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"./ModuleManager.sol\";\nimport \"../interfaces/IERC7579Account.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\n/**\n * @title reference implementation of HookManager\n * @author zeroknots.eth | rhinestone.wtf\n */\n\nabstract contract HookManager {\n /// @custom:storage-location erc7201:hookmanager.storage.msa\n struct HookManagerStorage {\n IHook _hook;\n }\n\n // keccak256(\"hookmanager.storage.msa\");\n bytes32 constant HOOKMANAGER_STORAGE_LOCATION =\n 0x36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb28431608;\n\n error HookPostCheckFailed();\n error HookAlreadyInstalled(address currentHook);\n\n modifier withHook() {\n address hook = _getHook();\n if (hook == address(0)) {\n _;\n } else {\n bytes memory hookData = IHook(hook).preCheck(msg.sender, msg.data);\n _;\n if (!IHook(hook).postCheck(hookData)) revert HookPostCheckFailed();\n }\n }\n\n function _setHook(address hook) internal virtual {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n sstore(slot, hook)\n }\n }\n\n function _installHook(address hook, bytes calldata data) internal virtual {\n address currentHook = _getHook();\n if (currentHook != address(0)) {\n revert HookAlreadyInstalled(currentHook);\n }\n _setHook(hook);\n IHook(hook).onInstall(data);\n }\n\n function _uninstallHook(\n address hook,\n bytes calldata data\n ) internal virtual {\n _setHook(address(0));\n IHook(hook).onUninstall(data);\n }\n\n function _getHook() internal view returns (address _hook) {\n bytes32 slot = HOOKMANAGER_STORAGE_LOCATION;\n assembly {\n _hook := sload(slot)\n }\n }\n\n function _isHookInstalled(address module) internal view returns (bool) {\n return _getHook() == module;\n }\n\n function getActiveHook() external view returns (address hook) {\n return _getHook();\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {SentinelListLib, SENTINEL} from \"../libs/SentinelList.sol\";\nimport {CallType, CALLTYPE_SINGLE, CALLTYPE_DELEGATECALL, CALLTYPE_STATIC} from \"../libs/ModeLib.sol\";\nimport {AccountBase} from \"./AccountBase.sol\";\nimport \"../interfaces/IERC7579Module.sol\";\nimport \"forge-std/interfaces/IERC165.sol\";\nimport \"./Receiver.sol\";\nimport {ArrayLib} from \"../../libraries/ArrayLib.sol\";\n\n/**\n * @title ModuleManager\n * @author zeroknots.eth | rhinestone.wtf\n * @dev This contract manages Validator, Executor and Fallback modules for the MSA\n * @dev it uses SentinelList to manage the linked list of modules\n * NOTE: the linked list is just an example. accounts may implement this differently\n */\nabstract contract ModuleManager is AccountBase, Receiver {\n using SentinelListLib for SentinelListLib.SentinelList;\n\n error InvalidModule(address module);\n error NoFallbackHandler(bytes4 selector);\n error CannotRemoveLastValidator();\n error FallbackInvalidCallType();\n error InvalidFallbackCaller(address caller);\n\n // keccak256(\"modulemanager.storage.msa\");\n bytes32 internal constant MODULEMANAGER_STORAGE_LOCATION =\n 0xf88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02;\n\n struct FallbackHandler {\n address handler;\n CallType calltype;\n address[] allowedCallers;\n }\n\n /// @custom:storage-location erc7201:modulemanager.storage.msa\n struct ModuleManagerStorage {\n // linked list of validators. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $validators;\n // linked list of executors. List is initialized by initializeAccount()\n SentinelListLib.SentinelList $executors;\n // single fallback handler for all fallbacks\n // account vendors may implement this differently. This is just a reference implementation\n mapping(bytes4 selector => FallbackHandler fallbackHandler) $fallbacks;\n }\n\n function $moduleManager()\n internal\n pure\n virtual\n returns (ModuleManagerStorage storage $ims)\n {\n bytes32 position = MODULEMANAGER_STORAGE_LOCATION;\n assembly {\n $ims.slot := position\n }\n }\n\n modifier onlyExecutorModule() {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n if (!$executors.contains(msg.sender)) revert InvalidModule(msg.sender);\n _;\n }\n\n modifier onlyValidatorModule(address validator) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n if (!$validators.contains(validator)) revert InvalidModule(validator);\n _;\n }\n\n function _initModuleManager() internal virtual {\n ModuleManagerStorage storage $ims = $moduleManager();\n $ims.$executors.init();\n $ims.$validators.init();\n }\n\n function isAlreadyInitialized() internal view virtual returns (bool) {\n ModuleManagerStorage storage $ims = $moduleManager();\n return $ims.$validators.alreadyInitialized();\n }\n\n /////////////////////////////////////////////////////\n // Manage Validators\n ////////////////////////////////////////////////////\n function _installValidator(\n address validator,\n bytes calldata data\n ) internal virtual {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n $validators.push(validator);\n IValidator(validator).onInstall(data);\n }\n\n function _uninstallValidator(\n address validator,\n bytes calldata data\n ) internal {\n // TODO: check if its the last validator. this might brick the account\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $validators.pop(prev, validator);\n IValidator(validator).onUninstall(disableModuleData);\n }\n\n function _isValidatorInstalled(\n address validator\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.contains(validator);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getValidatorPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $validators = $moduleManager()\n .$validators;\n return $validators.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Executors\n ////////////////////////////////////////////////////\n\n function _installExecutor(address executor, bytes calldata data) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n $executors.push(executor);\n IExecutor(executor).onInstall(data);\n }\n\n function _uninstallExecutor(\n address executor,\n bytes calldata data\n ) internal {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n (address prev, bytes memory disableModuleData) = abi.decode(\n data,\n (address, bytes)\n );\n $executors.pop(prev, executor);\n IExecutor(executor).onUninstall(disableModuleData);\n }\n\n function _isExecutorInstalled(\n address executor\n ) internal view virtual returns (bool) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.contains(executor);\n }\n\n /**\n * THIS IS NOT PART OF THE STANDARD\n * Helper Function to access linked list\n */\n function getExecutorsPaginated(\n address cursor,\n uint256 size\n ) external view virtual returns (address[] memory array, address next) {\n SentinelListLib.SentinelList storage $executors = $moduleManager()\n .$executors;\n return $executors.getEntriesPaginated(cursor, size);\n }\n\n /////////////////////////////////////////////////////\n // Manage Fallback\n ////////////////////////////////////////////////////\n\n function _installFallbackHandler(\n address handler,\n bytes calldata params\n ) internal virtual {\n bytes memory _params = params;\n bytes4 selector;\n CallType calltype;\n address[] memory allowedCallers;\n bytes memory initData;\n assembly {\n let configPtr := add(params.offset, 0x20)\n let configLen := calldataload(params.offset)\n\n selector := calldataload(params.offset)\n calltype := calldataload(configPtr)\n\n let allowedCallersLen := calldataload(add(configPtr, 0x20))\n\n allowedCallers := mload(0x40)\n mstore(\n 0x40,\n add(\n allowedCallers,\n and(add(mul(allowedCallersLen, 0x20), 0x1f), not(0x1f))\n )\n )\n\n for {\n let i := 0\n } lt(i, allowedCallersLen) {\n i := add(i, 1)\n } {\n mstore(\n add(allowedCallers, mul(i, 0x20)),\n calldataload(add(configPtr, add(0x60, mul(i, 0x20))))\n )\n }\n\n let initDataPos := calldataload(add(configPtr, 0x40))\n let initDataLen := calldataload(\n sub(add(configPtr, initDataPos), 0x20)\n )\n let initDataPtr := 0x60\n mstore(initDataPtr, initDataLen)\n calldatacopy(\n add(initDataPtr, 0x20),\n add(configPtr, initDataPos),\n initDataLen\n )\n initData := initDataPtr\n }\n\n if (calltype == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n\n if (_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector already used\");\n }\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n handler,\n calltype,\n allowedCallers\n );\n IFallback(handler).onInstall(initData);\n }\n\n function _uninstallFallbackHandler(\n address handler,\n bytes calldata deInitData\n ) internal virtual {\n bytes4 selector = bytes4(deInitData[0:4]);\n bytes memory _deInitData = deInitData[4:];\n\n if (!_isFallbackHandlerInstalled(selector)) {\n revert(\"Function selector not used\");\n }\n\n FallbackHandler memory activeFallback = $moduleManager().$fallbacks[\n selector\n ];\n\n if (activeFallback.handler != handler) {\n revert(\"Function selector not used by this handler\");\n }\n\n CallType callType = activeFallback.calltype;\n\n if (callType == CALLTYPE_DELEGATECALL) revert FallbackInvalidCallType();\n address[] memory allowedCallers = new address[](0);\n $moduleManager().$fallbacks[selector] = FallbackHandler(\n address(0),\n CallType.wrap(0x00),\n allowedCallers\n );\n\n IFallback(handler).onUninstall(_deInitData);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler != address(0);\n }\n\n function _isFallbackHandlerInstalled(\n bytes4 functionSig,\n address _handler\n ) internal view virtual returns (bool) {\n FallbackHandler storage $fallback = $moduleManager().$fallbacks[\n functionSig\n ];\n return $fallback.handler == _handler;\n }\n\n function getActiveFallbackHandler(\n bytes4 functionSig\n ) external view virtual returns (FallbackHandler memory) {\n return $moduleManager().$fallbacks[functionSig];\n }\n\n // validates that the caller is allowed and reverts if not.\n\n function _validateCaller(bytes4 sig) private view {\n address[] memory allowed = $moduleManager()\n .$fallbacks[sig]\n .allowedCallers;\n if (ArrayLib._contains(allowed, msg.sender) == false) {\n revert InvalidFallbackCaller(msg.sender);\n }\n }\n\n // FALLBACK\n // calling _validateCaller()\n\n fallback() external payable override(Receiver) {\n _validateCaller(msg.sig);\n FallbackHandler storage $fallbackHandler = $moduleManager().$fallbacks[\n msg.sig\n ];\n address handler = $fallbackHandler.handler;\n CallType calltype = $fallbackHandler.calltype;\n\n if (handler == address(0)) revert NoFallbackHandler(msg.sig);\n\n if (calltype == CALLTYPE_STATIC) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := staticcall(\n gas(),\n handler,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n if (calltype == CALLTYPE_SINGLE) {\n assembly {\n function allocate(length) -> pos {\n pos := mload(0x40)\n mstore(0x40, add(pos, length))\n }\n\n let calldataPtr := allocate(calldatasize())\n calldatacopy(calldataPtr, 0, calldatasize())\n\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n let senderPtr := allocate(20)\n mstore(senderPtr, shl(96, caller()))\n\n // Add 20 bytes for the address appended add the end\n let success := call(\n gas(),\n handler,\n 0,\n calldataPtr,\n add(calldatasize(), 20),\n 0,\n 0\n )\n\n let returnDataPtr := allocate(returndatasize())\n returndatacopy(returnDataPtr, 0, returndatasize())\n if iszero(success) {\n revert(returnDataPtr, returndatasize())\n }\n return(returnDataPtr, returndatasize())\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/core/Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title Receiver\n * @dev This contract receives safe-transferred ERC721 and ERC1155 tokens.\n * @author Modified from Solady\n * (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol)\n */\nabstract contract Receiver {\n /// @dev For receiving ETH.\n receive() external payable virtual {}\n\n /// @dev Fallback function with the `receiverFallback` modifier.\n fallback() external payable virtual {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport { CallType, ExecType, ModeCode } from \"../libs/ModeLib.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/IAccount.sol\";\n\nstruct Execution {\n address target;\n uint256 value;\n bytes callData;\n}\n\ninterface IERC7579Account {\n event ModuleInstalled(uint256 moduleTypeId, address module);\n event ModuleUninstalled(uint256 moduleTypeId, address module);\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n\n /**\n * @dev Executes a transaction on behalf of the account.\n * This function is intended to be called by Executor Modules\n * @dev Ensure adequate authorization control: i.e. onlyExecutorModule\n *\n * @dev MSA MUST implement this function signature.\n * If a mode is requested that is not supported by the Account, it MUST revert\n * @param mode The encoded execution mode of the transaction. See ModeLib.sol for details\n * @param executionCalldata The encoded execution call data\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n returns (bytes[] memory returnData);\n\n /**\n * @dev ERC-4337 executeUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf\n * The implementation of the function is OPTIONAL\n *\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function executeUserOp(PackedUserOperation calldata userOp) external payable;\n\n /**\n * @dev ERC-4337 validateUserOp according to ERC-4337 v0.7\n * This function is intended to be called by ERC-4337 EntryPoint.sol\n * this validation function should decode / sload the validator module to validate the userOp\n * and call it.\n *\n * @dev MSA MUST implement this function signature.\n * @param userOp PackedUserOperation struct (see ERC-4337 v0.7+)\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n returns (uint256 validSignature);\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);\n\n /**\n * @dev installs a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param initData arbitrary data that may be required on the module during `onInstall`\n * initialization.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n )\n external\n payable;\n\n /**\n * @dev uninstalls a Module of a certain type on the smart account\n * @dev Implement Authorization control of your chosing\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * @param module the module address\n * @param deInitData arbitrary data that may be required on the module during `onUninstall`\n * de-initialization.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n )\n external\n payable;\n\n /**\n * Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)\n * @param encodedMode the encoded mode\n */\n function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);\n\n /**\n * Function to check if the account supports installation of a certain module type Id\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n */\n function supportsModule(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * Function to check if the account has a certain module installed\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n * Note: keep in mind that some contracts can be multiple module types at the same time. It\n * thus may be necessary to query multiple module types\n * @param module the module address\n * @param additionalContext additional context data that the smart account may interpret to\n * identifiy conditions under which the module is installed.\n * usually this is not necessary, but for some special hooks that\n * are stored in mappings, this param might be needed\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n )\n external\n view\n returns (bool);\n\n /**\n * @dev Returns the account id of the smart account\n * @return accountImplementationId the account id of the smart account\n * the accountId should be structured like so:\n * \"vendorname.accountname.semver\"\n */\n function accountId() external view returns (string memory accountImplementationId);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\nuint256 constant VALIDATION_SUCCESS = 0;\nuint256 constant VALIDATION_FAILED = 1;\n\nuint256 constant MODULE_TYPE_VALIDATOR = 1;\nuint256 constant MODULE_TYPE_EXECUTOR = 2;\nuint256 constant MODULE_TYPE_FALLBACK = 3;\nuint256 constant MODULE_TYPE_HOOK = 4;\n\ninterface IModule {\n error AlreadyInitialized(address smartAccount);\n error NotInitialized(address smartAccount);\n\n /**\n * @dev This function is called by the smart account during installation of the module\n * @param data arbitrary data that may be required on the module during `onInstall`\n * initialization\n *\n * MUST revert on error (i.e. if module is already enabled)\n */\n function onInstall(bytes calldata data) external;\n\n /**\n * @dev This function is called by the smart account during uninstallation of the module\n * @param data arbitrary data that may be required on the module during `onUninstall`\n * de-initialization\n *\n * MUST revert on error\n */\n function onUninstall(bytes calldata data) external;\n\n /**\n * @dev Returns boolean value if module is a certain type\n * @param moduleTypeId the module type ID according the ERC-7579 spec\n *\n * MUST return true if the module is of the given type and false otherwise\n */\n function isModuleType(uint256 moduleTypeId) external view returns (bool);\n\n /**\n * @dev Returns if the module was already initialized for a provided smartaccount\n */\n function isInitialized(address smartAccount) external view returns (bool);\n}\n\ninterface IValidator is IModule {\n error InvalidTargetAddress(address target);\n\n /**\n * @dev Validates a transaction on behalf of the account.\n * This function is intended to be called by the MSA during the ERC-4337 validaton phase\n * Note: solely relying on bytes32 hash and signature is not suffcient for some\n * validation implementations (i.e. SessionKeys often need access to userOp.calldata)\n * @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.\n * The MSA MUST clean up the userOp before sending it to the validator.\n * @param userOpHash The hash of the user operation to be validated\n * @return return value according to ERC-4337\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n )\n external\n returns (uint256);\n\n /**\n * Validator can be used for ERC-1271 validation\n */\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n )\n external\n view\n returns (bytes4);\n}\n\ninterface IExecutor is IModule { }\n\ninterface IHook is IModule {\n function preCheck(\n address msgSender,\n bytes calldata msgData\n )\n external\n returns (bytes memory hookData);\n function postCheck(bytes calldata hookData) external returns (bool success);\n}\n\ninterface IFallback is IModule { }" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IMSA.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IERC7579Account} from \"./IERC7579Account.sol\";\n\nimport {CallType, ExecType, ModeCode} from \"../libs/ModeLib.sol\";\n\ninterface IMSA is IERC7579Account {\n // Error thrown when an unsupported ModuleType is requested\n error UnsupportedModuleType(uint256 moduleType);\n // Error thrown when an execution with an unsupported CallType was made\n error UnsupportedCallType(CallType callType);\n // Error thrown when an execution with an unsupported ExecType was made\n error UnsupportedExecType(ExecType execType);\n // Error thrown when account initialization fails\n error AccountInitializationFailed();\n\n /**\n * @dev Initializes the account. Function might be called directly, or by a Factory\n * @param data. encoded data that can be used during the initialization phase\n */\n function initializeAccount(bytes calldata data) external payable;\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ExecutionLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Execution} from \"../interfaces/IERC7579Account.sol\";\n\n/**\n * Helper Library for decoding Execution calldata\n * malloc for memory allocation is bad for gas. use this assembly instead\n */\nlibrary ExecutionLib {\n function decodeBatch(\n bytes calldata callData\n ) internal pure returns (Execution[] calldata executionBatch) {\n /*\n * Batch Call Calldata Layout\n * Offset (in bytes) | Length (in bytes) | Contents\n * 0x0 | 0x4 | bytes4 function selector\n * 0x4 | - |\n abi.encode(IERC7579Execution.Execution[])\n */\n // solhint-disable-next-line no-inline-assembly\n assembly (\"memory-safe\") {\n let dataPointer := add(\n callData.offset,\n calldataload(callData.offset)\n )\n\n // Extract the ERC7579 Executions\n executionBatch.offset := add(dataPointer, 32)\n executionBatch.length := calldataload(dataPointer)\n }\n }\n\n function encodeBatch(\n Execution[] memory executions\n ) internal pure returns (bytes memory callData) {\n callData = abi.encode(executions);\n }\n\n function decodeSingle(\n bytes calldata executionCalldata\n )\n internal\n pure\n returns (address target, uint256 value, bytes calldata callData)\n {\n target = address(bytes20(executionCalldata[0:20]));\n value = uint256(bytes32(executionCalldata[20:52]));\n callData = executionCalldata[52:];\n }\n\n function encodeSingle(\n address target,\n uint256 value,\n bytes memory callData\n ) internal pure returns (bytes memory userOpCalldata) {\n userOpCalldata = abi.encodePacked(target, value, callData);\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/ModeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n * @title ModeLib\n * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode\n * encoding is used.\n * Function Signature of execute function:\n * function execute(ModeCode mode, bytes calldata executionCalldata) external payable;\n * This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and\n * context.\n * NOTE: Simple Account implementations only have to scope for the most significant byte. Account that\n * implement\n * more complex execution modes may use the entire bytes32.\n *\n * |--------------------------------------------------------------------|\n * | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |\n * |--------------------------------------------------------------------|\n * | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |\n * |--------------------------------------------------------------------|\n *\n * CALLTYPE: 1 byte\n * CallType is used to determine how the executeCalldata paramter of the execute function has to be\n * decoded.\n * It can be either single, batch or delegatecall. In the future different calls could be added.\n * CALLTYPE can be used by a validation module to determine how to decode .\n *\n * EXECTYPE: 1 byte\n * ExecType is used to determine how the account should handle the execution.\n * It can indicate if the execution should revert on failure or continue execution.\n * In the future more execution modes may be added.\n * Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in\n * a batch fails, the entire batch is reverted\n *\n * UNUSED: 4 bytes\n * Unused bytes are reserved for future use.\n *\n * ModeSelector: bytes4\n * The \"optional\" mode selector can be used by account vendors, to implement custom behavior in\n * their accounts.\n * the way a ModeSelector is to be calculated is bytes4(keccak256(\"vendorname.featurename\"))\n * this is to prevent collisions between different vendors, while allowing innovation and the\n * development of new features without coordination between ERC-7579 implementing accounts\n *\n * ModePayload: 22 bytes\n * Mode payload is used to pass additional data to the smart account execution, this may be\n * interpreted depending on the ModeSelector\n *\n * ExecutionCallData: n bytes\n * single, delegatecall or batch exec abi.encoded as bytes\n */\nimport { Execution } from \"../interfaces/IERC7579Account.sol\";\n\n// Custom type for improved developer experience\ntype ModeCode is bytes32;\n\ntype CallType is bytes1;\n\ntype ExecType is bytes1;\n\ntype ModeSelector is bytes4;\n\ntype ModePayload is bytes22;\n\n// Default CallType\nCallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);\n// Batched CallType\nCallType constant CALLTYPE_BATCH = CallType.wrap(0x01);\n// @dev Implementing delegatecall is OPTIONAL!\n// implement delegatecall with extreme care.\nCallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);\nCallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);\n\n// @dev default behavior is to revert on failure\n// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure\n// Since this is value 0x00, no additional encoding is required for simple accounts\nExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);\n// @dev account may elect to change execution behavior. For example \"try exec\" / \"allow fail\"\nExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);\n\nModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));\n// Example declaration of a custom mode selector\nModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256(\"default.mode.offset\")));\n\n/**\n * @dev ModeLib is a helper library to encode/decode ModeCodes\n */\nlibrary ModeLib {\n function decode(ModeCode mode)\n internal\n pure\n returns (\n CallType _calltype,\n ExecType _execType,\n ModeSelector _modeSelector,\n ModePayload _modePayload\n )\n {\n assembly {\n _calltype := mode\n _execType := shl(8, mode)\n _modeSelector := shl(48, mode)\n _modePayload := shl(80, mode)\n }\n }\n\n function encode(\n CallType callType,\n ExecType execType,\n ModeSelector mode,\n ModePayload payload\n )\n internal\n pure\n returns (ModeCode)\n {\n return ModeCode.wrap(\n bytes32(\n abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)\n )\n );\n }\n\n function encodeSimpleBatch() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function encodeSimpleSingle() internal pure returns (ModeCode mode) {\n mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));\n }\n\n function getCallType(ModeCode mode) internal pure returns (CallType calltype) {\n assembly {\n calltype := mode\n }\n }\n}\n\nusing { eqModeSelector as == } for ModeSelector global;\nusing { eqCallType as == } for CallType global;\nusing { eqExecType as == } for ExecType global;\n\nfunction eqCallType(CallType a, CallType b) pure returns (bool) {\n return CallType.unwrap(a) == CallType.unwrap(b);\n}\n\nfunction eqExecType(ExecType a, ExecType b) pure returns (bool) {\n return ExecType.unwrap(a) == ExecType.unwrap(b);\n}\n\nfunction eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {\n return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);\n}" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/libs/SentinelList.sol": { + "content": "// https://github.com/zeroknots/sentinellist/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\naddress constant SENTINEL = address(0x1);\naddress constant ZERO_ADDRESS = address(0x0);\n\nlibrary SentinelListLib {\n struct SentinelList {\n mapping(address => address) entries;\n }\n\n error LinkedList_AlreadyInitialized();\n error LinkedList_InvalidPage();\n error LinkedList_InvalidEntry(address entry);\n error LinkedList_EntryAlreadyInList(address entry);\n\n function init(SentinelList storage self) internal {\n if (alreadyInitialized(self)) revert LinkedList_AlreadyInitialized();\n self.entries[SENTINEL] = SENTINEL;\n }\n\n function alreadyInitialized(\n SentinelList storage self\n ) internal view returns (bool) {\n return self.entries[SENTINEL] != ZERO_ADDRESS;\n }\n\n function getNext(\n SentinelList storage self,\n address entry\n ) internal view returns (address) {\n if (entry == ZERO_ADDRESS) {\n revert LinkedList_InvalidEntry(entry);\n }\n return self.entries[entry];\n }\n\n function push(SentinelList storage self, address newEntry) internal {\n if (newEntry == ZERO_ADDRESS || newEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(newEntry);\n }\n if (self.entries[newEntry] != ZERO_ADDRESS)\n revert LinkedList_EntryAlreadyInList(newEntry);\n self.entries[newEntry] = self.entries[SENTINEL];\n self.entries[SENTINEL] = newEntry;\n }\n\n function pop(\n SentinelList storage self,\n address prevEntry,\n address popEntry\n ) internal {\n if (popEntry == ZERO_ADDRESS || popEntry == SENTINEL) {\n revert LinkedList_InvalidEntry(prevEntry);\n }\n if (self.entries[prevEntry] != popEntry)\n revert LinkedList_InvalidEntry(popEntry);\n self.entries[prevEntry] = self.entries[popEntry];\n self.entries[popEntry] = ZERO_ADDRESS;\n }\n\n function contains(\n SentinelList storage self,\n address entry\n ) internal view returns (bool) {\n return SENTINEL != entry && self.entries[entry] != ZERO_ADDRESS;\n }\n\n function getEntriesPaginated(\n SentinelList storage self,\n address start,\n uint256 pageSize\n ) internal view returns (address[] memory array, address next) {\n if (start != SENTINEL && contains(self, start))\n revert LinkedList_InvalidEntry(start);\n if (pageSize == 0) revert LinkedList_InvalidPage();\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 entryCount = 0;\n next = self.entries[start];\n while (\n next != ZERO_ADDRESS && next != SENTINEL && entryCount < pageSize\n ) {\n array[entryCount] = next;\n next = self.entries[next];\n entryCount++;\n }\n\n /**\n * Because of the argument validation, we can assume that the loop will always iterate over the valid entry list values\n * and the `next` variable will either be an enabled entry or a sentinel address (signalling the end).\n *\n * If we haven't reached the end inside the loop, we need to set the next pointer to the last element of the entry array\n * because the `next` variable (which is a entry by itself) acting as a pointer to the start of the next page is neither\n * incSENTINELrent page, nor will it be included in the next one if you pass it as a start.\n */\n if (next != SENTINEL) {\n next = array[entryCount - 1];\n }\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n /// @solidity memory-safe-assembly\n assembly {\n mstore(array, entryCount)\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/Bootstrap.t.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {Bootstrap, BootstrapConfig} from \"../utils/Bootstrap.sol\";\nimport {IModule} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract BootstrapUtil {\n Bootstrap bootstrapSingleton;\n\n constructor() {\n bootstrapSingleton = new Bootstrap();\n }\n\n function _makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig memory config) {\n config.module = module;\n config.data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address module,\n bytes memory data\n ) public pure returns (BootstrapConfig[] memory config) {\n config = new BootstrapConfig[](1);\n config[0].module = module;\n config[0].data = abi.encodeCall(IModule.onInstall, data);\n }\n\n function makeBootstrapConfig(\n address[] memory modules,\n bytes[] memory datas\n ) public pure returns (BootstrapConfig[] memory configs) {\n configs = new BootstrapConfig[](modules.length);\n\n for (uint256 i; i < modules.length; i++) {\n configs[i] = _makeBootstrapConfig(modules[i], datas[i]);\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/dependencies/EntryPoint.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IEntryPoint} from \"../../../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {EntryPoint, SenderCreator} from \"../../../../../account-abstraction/contracts/core/EntryPoint.sol\";\nimport {EntryPointSimulations} from \"../../../../../account-abstraction/contracts/core/EntryPointSimulations.sol\";\n\ncontract EntryPointSimulationsPatch is EntryPointSimulations {\n address _entrypointAddr = address(this);\n\n SenderCreator _newSenderCreator;\n\n function init(address entrypointAddr) public {\n _entrypointAddr = entrypointAddr;\n initSenderCreator();\n }\n\n function initSenderCreator() internal override {\n //this is the address of the first contract created with CREATE by this address.\n address createdObj = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(hex\"d694\", _entrypointAddr, hex\"01\")\n )\n )\n )\n );\n _newSenderCreator = SenderCreator(createdObj);\n }\n\n function senderCreator()\n internal\n view\n virtual\n override\n returns (SenderCreator)\n {\n return _newSenderCreator;\n }\n}\n\naddress constant ENTRYPOINT_ADDR = 0x0000000071727De22E5E9d8BAf0edAc6f37da032;\n\nfunction etchEntrypoint() returns (IEntryPoint) {\n address payable entryPoint = payable(\n address(new EntryPointSimulationsPatch())\n );\n etch(ENTRYPOINT_ADDR, entryPoint.code);\n EntryPointSimulationsPatch(payable(ENTRYPOINT_ADDR)).init(entryPoint);\n\n return IEntryPoint(ENTRYPOINT_ADDR);\n}\n\nimport \"forge-std/Vm.sol\";\n\naddress constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\nfunction getAddr(uint256 pk) pure returns (address) {\n return Vm(VM_ADDR).addr(pk);\n}\n\nfunction sign(\n uint256 pk,\n bytes32 msgHash\n) pure returns (uint8 v, bytes32 r, bytes32 s) {\n return Vm(VM_ADDR).sign(pk, msgHash);\n}\n\nfunction etch(address target, bytes memory runtimeBytecode) {\n Vm(VM_ADDR).etch(target, runtimeBytecode);\n}\n\nfunction label(address _addr, string memory _label) {\n Vm(VM_ADDR).label(_addr, _label);\n}\n\nfunction expectEmit() {\n Vm(VM_ADDR).expectEmit();\n}\n\nfunction recordLogs() {\n Vm(VM_ADDR).recordLogs();\n}\n\nfunction getRecordedLogs() returns (VmSafe.Log[] memory) {\n return Vm(VM_ADDR).getRecordedLogs();\n}\n\nfunction prank(address _addr) {\n Vm(VM_ADDR).prank(_addr);\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IFallback} from \"../../interfaces/IERC7579Module.sol\";\nimport {IERC7579Account, Execution} from \"../../interfaces/IERC7579Account.sol\";\nimport {ExecutionLib} from \"../../libs/ExecutionLib.sol\";\nimport {ModeLib} from \"../../libs/ModeLib.sol\";\n\nimport \"forge-std/console2.sol\";\n\ncontract MockFallback is IFallback {\n function delegateCallTarget(\n uint256 param\n ) public view returns (uint256 _param, address sender, address _this) {\n console2.log(\n \"delegateCallTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, address(this));\n }\n\n function callTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"callTarget called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function staticCallTarget(\n uint256 param\n )\n public\n view\n returns (\n uint256 _param,\n address sender,\n address er2771Sender,\n address _this\n )\n {\n console2.log(\n \"staticCall called with param: %s msg.sender: %s this: %s\",\n param,\n msg.sender,\n address(this)\n );\n return (param, msg.sender, _msgSender(), address(this));\n }\n\n function _msgSender() internal pure returns (address sender) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n /* solhint-enable no-inline-assembly */\n }\n\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {}\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {}\n}\n" + }, + "src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../core/ModuleManager.sol\";\nimport \"../core/HookManager.sol\";\n\nimport \"../interfaces/IERC7579Module.sol\";\n\nstruct BootstrapConfig {\n address module;\n bytes data;\n}\n\ncontract Bootstrap is ModuleManager, HookManager {\n function singleInitMSA(IModule validator, bytes calldata data) external {\n // init validator\n _installValidator(address(validator), data);\n }\n\n /**\n * This function is intended to be called by the MSA with a delegatecall.\n * Make sure that the MSA already initilazed the linked lists in the ModuleManager prior to\n * calling this function\n */\n function initMSA(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n {\n // init validators\n for (uint256 i; i < $valdiators.length; i++) {\n _installValidator($valdiators[i].module, $valdiators[i].data);\n }\n\n // init executors\n for (uint256 i; i < $executors.length; i++) {\n if ($executors[i].module == address(0)) continue;\n _installExecutor($executors[i].module, $executors[i].data);\n }\n\n // init hook\n if (_hook.module != address(0)) {\n _installHook(_hook.module, _hook.data);\n }\n\n // init fallback\n for (uint256 i; i < _fallbacks.length; i++) {\n if (_fallbacks[i].module == address(0)) continue;\n _installFallbackHandler(_fallbacks[i].module, _fallbacks[i].data);\n }\n }\n\n function _getInitMSACalldata(\n BootstrapConfig[] calldata $valdiators,\n BootstrapConfig[] calldata $executors,\n BootstrapConfig calldata _hook,\n BootstrapConfig[] calldata _fallbacks\n )\n external\n view\n returns (bytes memory init)\n {\n init = abi.encode(\n address(this),\n abi.encodeCall(this.initMSA, ($valdiators, $executors, _hook, _fallbacks))\n );\n }\n}" + }, + "src/modular-etherspot-wallet/interfaces/IAccessController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ninterface IAccessController {\n /// Structs\n struct NewOwnerProposal {\n address newOwnerProposed;\n bool resolved;\n address[] guardiansApproved;\n uint256 approvalCount;\n uint256 proposedAt;\n }\n\n /// Events\n event OwnerAdded(address account, address newOwner);\n event OwnerRemoved(address account, address removedOwner);\n event GuardianAdded(address account, address newGuardian);\n event GuardianRemoved(address account, address removedGuardian);\n event ProposalSubmitted(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n address proposer\n );\n event QuorumNotReached(\n address account,\n uint256 proposalId,\n address newOwnerProposed,\n uint256 approvalCount\n );\n event ProposalDiscarded(\n address account,\n uint256 proposalId,\n address discardedBy\n );\n\n /// External\n function addOwner(address _newOwner) external;\n\n function removeOwner(address _owner) external;\n\n function addGuardian(address _newGuardian) external;\n\n function removeGuardian(address _guardian) external;\n\n function changeProposalTimelock(uint256 _newTimelock) external;\n\n function discardCurrentProposal() external;\n\n function guardianPropose(address _newOwner) external;\n\n function guardianCosign() external;\n\n /// Views\n function isOwner(address _address) external view returns (bool);\n\n function isGuardian(address _address) external view returns (bool);\n\n function getProposal(\n uint256 _proposalId\n )\n external\n view\n returns (\n address ownerProposed_,\n uint256 approvalCount_,\n address[] memory guardiansApproved_,\n bool resolved_,\n uint256 proposedAt_\n );\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport {IValidator} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IERC7579Account} from \"../../../src/modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @title ERC20SessionKeyValidator Interface\n/// @author Etherspot\n/// @notice This interface defines the functions and events of the ERC20SessionKeyValidator contract.\ninterface IERC20SessionKeyValidator is IValidator {\n /// @notice Emitted when a new session key is enabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is enabled.\n event ERC20SKV_SessionKeyEnabled(address sessionKey, address wallet);\n\n /// @notice Emitted when a session key is disabled for a wallet.\n /// @param sessionKey The address of the session key.\n /// @param wallet The address of the wallet for which the session key is disabled.\n event ERC20SKV_SessionKeyDisabled(address sessionKey, address wallet);\n\n /// @notice Struct representing the data associated with a session key.\n struct SessionData {\n address token; // The ERC20 token contract address.\n bytes4 interfaceId; // The interface ID of the ERC20 token contract.\n bytes4 funcSelector; // The function selector for the allowed operation (e.g., transfer, transferFrom).\n uint256 spendingLimit; // The maximum amount that can be spent with this session key.\n uint48 validAfter; // The timestamp after which the session key is valid.\n uint48 validUntil; // The timestamp until which the session key is valid.\n bool paused; // Flag indicating whether the session key is paused or not.\n }\n\n /// @notice Enables a new session key for the caller's wallet.\n /// @param _sessionData The encoded session data containing the session key address, token address, interface ID, function selector, spending limit, valid after timestamp, and valid until timestamp.\n function enableSessionKey(bytes calldata _sessionData) external;\n\n /// @notice Disables a session key for the caller's wallet.\n /// @param _session The address of the session key to disable.\n function disableSessionKey(address _session) external;\n\n /// @notice Rotates a session key by disabling the old one and enabling a new one.\n /// @param _oldSessionKey The address of the old session key to disable.\n /// @param _newSessionData The encoded session data for the new session key.\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external;\n\n /// @notice Toggles the pause state of a session key for the caller's wallet.\n /// @param _sessionKey The address of the session key to toggle the pause state for.\n function toggleSessionKeyPause(address _sessionKey) external;\n\n /// @notice Checks if a session key is paused for the caller's wallet.\n /// @param _sessionKey The address of the session key to check.\n /// @return paused True if the session key is paused, false otherwise.\n function checkSessionKeyPaused(\n address _sessionKey\n ) external view returns (bool paused);\n\n /// @notice Validates the parameters of a session key for a given user operation.\n /// @param _sessionKey The address of the session key.\n /// @param userOp The packed user operation containing the call data.\n /// @return valid True if the session key parameters are valid for the user operation, false otherwise.\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) external returns (bool valid);\n\n /// @notice Returns the list of associated session keys for the caller's wallet.\n /// @return keys The array of associated session key addresses.\n function getAssociatedSessionKeys()\n external\n view\n returns (address[] memory keys);\n\n /// @notice Returns the session data for a given session key and the caller's wallet.\n /// @param _sessionKey The address of the session key.\n /// @return data The session data struct.\n function getSessionKeyData(\n address _sessionKey\n ) external view returns (SessionData memory data);\n\n /// @notice Validates a user operation using a session key.\n /// @param userOp The packed user operation.\n /// @param userOpHash The hash of the user operation.\n /// @return validationData The validation data containing the expiration time and valid after timestamp of the session key.\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external returns (uint256 validationData);\n\n /// @notice Checks if the module type matches the validator module type.\n /// @param moduleTypeId The module type ID to check.\n /// @return True if the module type matches the validator module type, false otherwise.\n function isModuleType(uint256 moduleTypeId) external pure returns (bool);\n\n /// @notice Placeholder function for module installation.\n /// @param data The data to pass during installation.\n function onInstall(bytes calldata data) external;\n\n /// @notice Placeholder function for module uninstallation.\n /// @param data The data to pass during uninstallation.\n function onUninstall(bytes calldata data) external;\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param sender The address of the sender.\n /// @param hash The hash of the message.\n /// @param data The data associated with the message.\n /// @return A bytes4 value indicating the function is not implemented.\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4);\n\n /// @notice Reverts with a \"NotImplemented\" error.\n /// @param smartAccount The address of the smart account.\n /// @return True if the smart account is initialized, false otherwise.\n function isInitialized(address smartAccount) external view returns (bool);\n}\n" + }, + "src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {IMSA} from \"../erc7579-ref-impl/interfaces/IMSA.sol\";\nimport {IAccessController} from \"./IAccessController.sol\";\n\ninterface IModularEtherspotWallet is IMSA, IAccessController\n{\n error OnlyProxy();\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ArrayLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ArrayLib {\n function _contains(\n address[] memory A,\n address a\n ) internal pure returns (bool) {\n (, bool isIn) = _indexOf(A, a);\n return isIn;\n }\n\n function _indexOf(\n address[] memory A,\n address a\n ) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (0, false);\n }\n\n function _removeElement(\n address[] storage _data,\n address _element\n ) internal {\n uint256 length = _data.length;\n // remove item from array and resize array\n for (uint256 ii = 0; ii < length; ii++) {\n if (_data[ii] == _element) {\n if (length > 1) {\n _data[ii] = _data[length - 1];\n }\n _data.pop();\n break;\n }\n }\n }\n}\n" + }, + "src/modular-etherspot-wallet/libraries/ErrorsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary ErrorsLib {\n /// AccessController\n error OnlyOwnerOrSelf();\n error OnlyGuardian();\n error OnlyOwnerOrGuardianOrSelf();\n\n error AddingInvalidOwner();\n error RemovingInvalidOwner();\n error AddingInvalidGuardian();\n error RemovingInvalidGuardian();\n\n error WalletNeedsOwner();\n error NotEnoughGuardians();\n\n error ProposalResolved();\n error ProposalUnresolved();\n error AlreadySignedProposal();\n\n error ProposalTimelocked();\n error InvalidProposal();\n\n // EtherspotWallet7579 Errors\n}\n" + }, + "src/modular-etherspot-wallet/modules/executors/ERC20Actions.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IFallback} from \"../../../modular-etherspot-wallet/erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ERC20Actions is IFallback {\n function onInstall(bytes calldata data) external override {}\n\n function onUninstall(bytes calldata data) external override {}\n function isModuleType(\n uint256 moduleTypeId\n ) external view override returns (bool) {}\n\n function isInitialized(address _mew) external view returns (bool) {}\n function transferERC20Action(\n address _token,\n address _to,\n uint256 _amount\n ) external {\n IERC20(_token).transferFrom(msg.sender, _to, _amount);\n }\n\n function invalidERC20Action() public pure returns (uint256) {\n return 0;\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.13;\n\n/// @title ModuleIsolationHook\n/// @author windowhan (https://github.com/windowhan) (modifications by lbw33)\n/// @notice Custom hook to prevent modules from installing/uninstalling other modules\n/// @dev Implements preCheck hook to block restricted function calls\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\n\ncontract ModuleIsolationHook is IHook {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /// @notice Records which modules this hook is installed for\n mapping(address => bool) public installed;\n\n /// @notice Called when this hook is installed for a module\n function onInstall(bytes calldata data) external override {\n installed[msg.sender] = true;\n }\n\n /// @notice Called when this hook is uninstalled for a module\n function onUninstall(bytes calldata data) external override {\n installed[msg.sender] = false;\n }\n /// @notice Checks if a signature is in a list\n /// @param target Signature to check for\n /// @param list List of signatures\n /// @return bool True if target is in the list\n function contains(\n bytes4 target,\n bytes4[] memory list\n ) public view returns (bool) {\n for (uint i; i < list.length; i++) {\n if (target == list[i]) return true;\n }\n return false;\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param msgSender Message sender address\n /// @param msgData Message data\n function preCheck(\n address msgSender,\n bytes calldata msgData\n ) external override returns (bytes memory hookData) {\n bytes4 firstFuncSig = bytes4(msgData[0:4]);\n if (\n firstFuncSig == ModularEtherspotWallet.executeFromExecutor.selector\n ) {\n ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36]));\n (CallType callType, ExecType execType, , ) = mode.decode();\n integrityCheck(callType, msgData[68 + 32:]);\n }\n return \"\";\n }\n\n /// @notice Checks message data and reverts on restricted signatures\n /// @param callType Call type\n /// @param executionCallData Call data\n function integrityCheck(\n CallType callType,\n bytes calldata executionCallData\n ) public {\n bytes4[] memory bannedSigs = new bytes4[](5);\n bannedSigs[0] = ModularEtherspotWallet.execute.selector;\n bannedSigs[1] = ModularEtherspotWallet.executeFromExecutor.selector;\n bannedSigs[2] = ModularEtherspotWallet.executeUserOp.selector;\n bannedSigs[3] = ModularEtherspotWallet.installModule.selector;\n bannedSigs[4] = ModularEtherspotWallet.uninstallModule.selector;\n\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCallData.decodeBatch();\n for (uint i; i < executions.length; i++) {\n bytes4 checkSig = bytes4(executions[i].callData[0]) |\n (bytes4(executions[i].callData[1]) >> 8) |\n (bytes4(executions[i].callData[2]) >> 16) |\n (bytes4(executions[i].callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCallData.decodeSingle();\n\n bytes4 checkSig = bytes4(callData[0]) |\n (bytes4(callData[1]) >> 8) |\n (bytes4(callData[2]) >> 16) |\n (bytes4(callData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n } else if (callType == CALLTYPE_DELEGATECALL) {\n bytes4 checkSig = bytes4(executionCallData[0]) |\n (bytes4(executionCallData[1]) >> 8) |\n (bytes4(executionCallData[2]) >> 16) |\n (bytes4(executionCallData[3]) >> 24);\n require(\n !contains(checkSig, bannedSigs),\n \"MEW::ModuleIsolationHook:BannedSignature\"\n );\n }\n }\n\n /// @notice Main pre-call check for restricted signatures\n /// @param hookData Message sender address\n function postCheck(\n bytes calldata hookData\n ) external returns (bool success) {}\n\n /// @notice Checks if this contract is a hook module type\n /// @param typeID Module type ID\n /// @return bool True if module type is HOOK\n function isModuleType(\n uint256 typeID\n ) external view override returns (bool) {\n return MODULE_TYPE_HOOK == typeID;\n }\n\n /// @notice Checks if this hook is installed for a wallet\n /// @param smartAccount Wallet address\n /// @return bool True if this hook is installed for the wallet\n function isInitialized(\n address smartAccount\n ) external view override returns (bool) {\n return installed[smartAccount];\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {MODULE_TYPE_VALIDATOR, VALIDATION_FAILED} from \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {PackedUserOperation} from \"../../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../../../../account-abstraction/contracts/core/Helpers.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\n\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {IERC20SessionKeyValidator} from \"../../interfaces/IERC20SessionKeyValidator.sol\";\nimport {ERC20Actions} from \"../executors/ERC20Actions.sol\";\n\ncontract ERC20SessionKeyValidator is IERC20SessionKeyValidator, EIP712 {\n using ModeLib for ModeCode;\n using ExecutionLib for bytes;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* CONSTANTS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"ERC20SessionKeyValidator\";\n string constant VERSION = \"1.0.0\";\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* ERRORS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n error ERC20SKV_InvalidSessionKey();\n error ERC20SKV_SessionKeyDoesNotExist(address session);\n error ERC20SKV_SessionPaused(address sessionKey);\n error ERC20SKV_UnsuportedToken();\n error ERC20SKV_UnsupportedSelector(bytes4 selectorUsed);\n error ERC20SKV_UnsupportedInterface();\n error ERC20SKV_SessionKeySpendLimitExceeded();\n error ERC20SKV_InsufficientApprovalAmount();\n error NotImplemented();\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* MAPPINGS */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n mapping(address => bool) public initialized;\n mapping(address wallet => address[] assocSessionKeys)\n public walletSessionKeys;\n mapping(address sessionKey => mapping(address wallet => SessionData))\n public sessionData;\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* PUBLIC/EXTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n // @inheritdoc IERC20SessionKeyValidator\n function enableSessionKey(bytes calldata _sessionData) public {\n address sessionKey = address(bytes20(_sessionData[0:20]));\n address token = address(bytes20(_sessionData[20:40]));\n bytes4 interfaceId = bytes4(_sessionData[40:44]);\n bytes4 funcSelector = bytes4(_sessionData[44:48]);\n uint256 spendingLimit = uint256(bytes32(_sessionData[48:80]));\n uint48 validAfter = uint48(bytes6(_sessionData[80:86]));\n uint48 validUntil = uint48(bytes6(_sessionData[86:92]));\n sessionData[sessionKey][msg.sender] = SessionData(\n token,\n interfaceId,\n funcSelector,\n spendingLimit,\n validAfter,\n validUntil,\n false\n );\n walletSessionKeys[msg.sender].push(sessionKey);\n emit ERC20SKV_SessionKeyEnabled(sessionKey, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function disableSessionKey(address _session) public {\n if (sessionData[_session][msg.sender].validUntil == 0)\n revert ERC20SKV_SessionKeyDoesNotExist(_session);\n delete sessionData[_session][msg.sender];\n emit ERC20SKV_SessionKeyDisabled(_session, msg.sender);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function rotateSessionKey(\n address _oldSessionKey,\n bytes calldata _newSessionData\n ) external {\n disableSessionKey(_oldSessionKey);\n enableSessionKey(_newSessionData);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function toggleSessionKeyPause(address _sessionKey) external {\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n sd.paused = !sd.paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function checkSessionKeyPaused(\n address _sessionKey\n ) public view returns (bool paused) {\n return sessionData[_sessionKey][msg.sender].paused;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateSessionKeyParams(\n address _sessionKey,\n PackedUserOperation calldata userOp\n ) public returns (bool valid) {\n bytes calldata callData = userOp.callData;\n (\n bytes4 selector,\n address target,\n address to,\n address from,\n uint256 amount\n ) = _digest(callData);\n\n SessionData storage sd = sessionData[_sessionKey][msg.sender];\n if (sd.validUntil == 0 || sd.validUntil < block.timestamp)\n revert ERC20SKV_InvalidSessionKey();\n if (target != sd.token) revert ERC20SKV_UnsuportedToken();\n if (IERC165(target).supportsInterface(sd.interfaceId) == false)\n revert ERC20SKV_UnsupportedInterface();\n if (selector != sd.funcSelector)\n revert ERC20SKV_UnsupportedSelector(selector);\n if (amount > sd.spendingLimit)\n revert ERC20SKV_SessionKeySpendLimitExceeded();\n if (checkSessionKeyPaused(_sessionKey))\n revert ERC20SKV_SessionPaused(_sessionKey);\n return true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getAssociatedSessionKeys()\n public\n view\n returns (address[] memory keys)\n {\n return walletSessionKeys[msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function getSessionKeyData(\n address _sessionKey\n ) public view returns (SessionData memory data) {\n return sessionData[_sessionKey][msg.sender];\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256 validationData) {\n // EIP712\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, userOpHash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address sessionKeySigner = ECDSA.recover(ethHash, userOp.signature);\n\n if (!validateSessionKeyParams(sessionKeySigner, userOp))\n return VALIDATION_FAILED;\n SessionData storage sd = sessionData[sessionKeySigner][msg.sender];\n return _packValidationData(false, sd.validUntil, sd.validAfter);\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isModuleType(\n uint256 moduleTypeId\n ) external pure override returns (bool) {\n return moduleTypeId == MODULE_TYPE_VALIDATOR;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onInstall(bytes calldata data) external override {\n initialized[msg.sender] = true;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function onUninstall(bytes calldata data) external override {\n address[] memory sessionKeys = getAssociatedSessionKeys();\n for (uint256 i; i < sessionKeys.length; i++) {\n delete sessionData[sessionKeys[i]][msg.sender];\n }\n initialized[msg.sender] = false;\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isValidSignatureWithSender(\n address sender,\n bytes32 hash,\n bytes calldata data\n ) external view returns (bytes4) {\n revert NotImplemented();\n }\n\n // @inheritdoc IERC20SessionKeyValidator\n function isInitialized(address smartAccount) external view returns (bool) {\n revert NotImplemented();\n }\n\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n /* INTERNAL */\n /*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*§*/\n\n function _digest(\n bytes calldata _data\n )\n internal\n pure\n returns (\n bytes4 selector,\n address targetContract,\n address to,\n address from,\n uint256 amount\n )\n {\n bytes4 functionSelector;\n assembly {\n functionSelector := calldataload(_data.offset)\n targetContract := calldataload(add(_data.offset, 0x04))\n }\n if (\n functionSelector == IERC20.approve.selector ||\n functionSelector == IERC20.transfer.selector ||\n functionSelector == ERC20Actions.transferERC20Action.selector\n ) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n to := calldataload(add(_data.offset, 0x24))\n amount := calldataload(add(_data.offset, 0x44))\n }\n return (functionSelector, targetContract, to, address(0), amount);\n } else if (functionSelector == IERC20.transferFrom.selector) {\n assembly {\n targetContract := calldataload(add(_data.offset, 0x04))\n from := calldataload(add(_data.offset, 0x24))\n to := calldataload(add(_data.offset, 0x44))\n amount := calldataload(add(_data.offset, 0x64))\n }\n return (functionSelector, targetContract, to, from, amount);\n } else {\n revert ERC20SKV_UnsupportedSelector(functionSelector);\n }\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Account.sol\";\nimport \"../../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport \"../../erc7579-ref-impl/libs/ModeLib.sol\";\nimport \"../../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ModularEtherspotWallet} from \"../../wallet/ModularEtherspotWallet.sol\";\nimport {ECDSA} from \"solady/src/utils/ECDSA.sol\";\nimport {EIP712} from \"solady/src/utils/EIP712.sol\";\n\ncontract MultipleOwnerECDSAValidator is EIP712, IValidator {\n using ExecutionLib for bytes;\n using ECDSA for bytes32;\n\n /// @dev `keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")`.\n bytes32 internal constant EIP712_DOMAIN_TYPEHASH =\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n string constant NAME = \"MultipleOwnerECDSAValidator\";\n string constant VERSION = \"1.0.0\";\n\n error InvalidExec();\n\n mapping(address => bool) internal _initialized;\n\n function onInstall(bytes calldata data) external override {\n if (isInitialized(msg.sender)) revert AlreadyInitialized(msg.sender);\n _initialized[msg.sender] = true;\n }\n\n function onUninstall(bytes calldata data) external override {\n if (!isInitialized(msg.sender)) revert NotInitialized(msg.sender);\n _initialized[msg.sender] = false;\n }\n\n function isInitialized(\n address smartAccount\n ) public view override returns (bool) {\n return _initialized[smartAccount];\n }\n\n function isModuleType(\n uint256 typeID\n ) external pure override returns (bool) {\n return typeID == MODULE_TYPE_VALIDATOR;\n }\n\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash\n ) external override returns (uint256) {\n bytes32 hash = userOpHash.toEthSignedMessageHash();\n address signer = hash.recover(userOp.signature);\n if (\n signer == address(0) ||\n !ModularEtherspotWallet(payable(msg.sender)).isOwner(signer)\n ) {\n return VALIDATION_FAILED;\n }\n // get the function selector that will be called by EntryPoint\n bytes4 execFunction = bytes4(userOp.callData[:4]);\n\n // get the mode\n CallType callType = CallType.wrap(bytes1(userOp.callData[4]));\n bytes calldata executionCalldata = userOp.callData[36:];\n if (callType == CALLTYPE_BATCH) {\n Execution[] calldata executions = executionCalldata.decodeBatch();\n } else if (callType == CALLTYPE_SINGLE) {\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n }\n }\n\n function isValidSignatureWithSender(\n address,\n bytes32 hash,\n bytes calldata data\n ) external view override returns (bytes4) {\n // Include the proxy address in the domain separator\n bytes32 domainSeparator = _domainSeparator();\n bytes32 signedMessageHash = keccak256(\n abi.encodePacked(\"\\x19\\x01\", domainSeparator, hash)\n );\n bytes32 ethHash = ECDSA.toEthSignedMessageHash(signedMessageHash);\n address owner = ECDSA.recover(ethHash, data);\n if (ModularEtherspotWallet(payable(msg.sender)).isOwner(owner)) {\n return 0x1626ba7e;\n }\n return 0xffffffff;\n }\n\n function _domainSeparator() internal view override returns (bytes32) {\n (string memory _name, string memory _version) = _domainNameAndVersion();\n bytes32 nameHash = keccak256(bytes(_name));\n bytes32 versionHash = keccak256(bytes(_version));\n // Use the proxy address for the EIP-712 domain separator.\n address proxyAddress = address(this);\n\n // Construct the domain separator with name, version, chainId, and proxy address.\n bytes32 typeHash = EIP712_DOMAIN_TYPEHASH;\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n proxyAddress\n )\n );\n }\n\n function _domainNameAndVersion()\n internal\n pure\n override\n returns (string memory, string memory)\n {\n return (NAME, VERSION);\n }\n}\n" + }, + "src/modular-etherspot-wallet/test/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.23;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract TestERC20 is ERC20, ERC165 {\n constructor() ERC20(\"TERC20\", \"TestERC20\") {}\n\n function mint(address sender, uint256 amount) external {\n _mint(sender, amount);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == type(IERC20).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + }, + "src/modular-etherspot-wallet/utils/ERC4337Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IEntryPoint} from \"../../../account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"solady/src/utils/ECDSA.sol\";\nimport {Vm} from \"forge-std/Test.sol\";\n\nlibrary ERC4337Utils {\n function fillUserOp(\n IEntryPoint _entryPoint,\n address _sender,\n bytes memory _data\n ) internal view returns (PackedUserOperation memory op) {\n op.sender = _sender;\n op.nonce = _entryPoint.getNonce(_sender, 0);\n op.callData = _data;\n op.accountGasLimits = bytes32(\n abi.encodePacked(uint128(2e6), uint128(2e6))\n );\n op.preVerificationGas = 50000;\n op.gasFees = bytes32(abi.encodePacked(uint128(1), uint128(1)));\n }\n\n function signUserOpHash(\n IEntryPoint _entryPoint,\n Vm _vm,\n uint256 _key,\n PackedUserOperation memory _op\n ) internal view returns (bytes memory signature) {\n bytes32 hash = _entryPoint.getUserOpHash(_op);\n (uint8 v, bytes32 r, bytes32 s) = _vm.sign(\n _key,\n ECDSA.toEthSignedMessageHash(hash)\n );\n signature = abi.encodePacked(r, s, v);\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\nimport \"../erc7579-ref-impl/libs/ModeLib.sol\";\nimport {ExecutionLib} from \"../erc7579-ref-impl/libs/ExecutionLib.sol\";\nimport {ExecutionHelper} from \"../erc7579-ref-impl/core/ExecutionHelper.sol\";\nimport {PackedUserOperation} from \"../../../account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport \"../erc7579-ref-impl/interfaces/IERC7579Module.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\nimport {ModuleManager} from \"../erc7579-ref-impl/core/ModuleManager.sol\";\nimport {HookManager} from \"../erc7579-ref-impl/core/HookManager.sol\";\nimport {AccessController} from \"../access/AccessController.sol\";\n\ncontract ModularEtherspotWallet is\n AccessController,\n IModularEtherspotWallet,\n ExecutionHelper,\n ModuleManager,\n HookManager\n{\n using ExecutionLib for bytes;\n using ModeLib for ModeCode;\n address public immutable implementation = address(this);\n\n /**\n * @dev modifier to restrict access to calling on implementation\n */\n modifier onlyProxy() {\n if (address(this) == implementation) revert OnlyProxy();\n _;\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by the entry point or the account itself\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function execute(\n ModeCode mode,\n bytes calldata executionCalldata\n ) external payable onlyEntryPointOrSelf withHook {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) _execute(executions);\n else if (execType == EXECTYPE_TRY) _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _execute(target, value, callData);\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY)\n _tryExecute(target, value, callData);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n * @dev this function is only callable by an installed executor module\n * @dev this function demonstrates how to implement\n * CallType SINGLE and BATCH and ExecType DEFAULT and TRY\n * @dev this function demonstrates how to implement hook support (modifier)\n */\n function executeFromExecutor(\n ModeCode mode,\n bytes calldata executionCalldata\n )\n external\n payable\n onlyExecutorModule\n withHook\n returns (\n bytes[] memory returnData // TODO returnData is not used\n )\n {\n (CallType callType, ExecType execType, , ) = mode.decode();\n\n // check if calltype is batch or single\n if (callType == CALLTYPE_BATCH) {\n // destructure executionCallData according to batched exec\n Execution[] calldata executions = executionCalldata.decodeBatch();\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) returnData = _execute(executions);\n else if (execType == EXECTYPE_TRY)\n returnData = _tryExecute(executions);\n else revert UnsupportedExecType(execType);\n } else if (callType == CALLTYPE_SINGLE) {\n // destructure executionCallData according to single exec\n (\n address target,\n uint256 value,\n bytes calldata callData\n ) = executionCalldata.decodeSingle();\n returnData = new bytes[](1);\n bool success;\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT) {\n returnData[0] = _execute(target, value, callData);\n }\n // TODO: implement event emission for tryExecute singleCall\n else if (execType == EXECTYPE_TRY) {\n (success, returnData[0]) = _tryExecute(target, value, callData);\n if (!success) emit TryExecuteUnsuccessful(0, returnData[0]);\n } else {\n revert UnsupportedExecType(execType);\n }\n } else if (callType == CALLTYPE_DELEGATECALL) {\n // destructure executionCallData according to single exec\n address delegate = address(\n uint160(bytes20(executionCalldata[0:20]))\n );\n bytes calldata callData = executionCalldata[20:];\n // check if execType is revert or try\n if (execType == EXECTYPE_DEFAULT)\n _executeDelegatecall(delegate, callData);\n else if (execType == EXECTYPE_TRY)\n _tryExecuteDelegatecall(delegate, callData);\n else revert UnsupportedExecType(execType);\n } else {\n revert UnsupportedCallType(callType);\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function executeUserOp(\n PackedUserOperation calldata userOp\n ) external payable onlyEntryPointOrSelf {\n bytes calldata callData = userOp.callData[4:];\n (bool success, ) = address(this).delegatecall(callData);\n if (!success) revert ExecutionFailed();\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function installModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata initData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR)\n _installValidator(module, initData);\n else if (moduleTypeId == MODULE_TYPE_EXECUTOR)\n _installExecutor(module, initData);\n else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _installFallbackHandler(module, initData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK)\n _installHook(module, initData);\n else revert UnsupportedModuleType(moduleTypeId);\n emit ModuleInstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function uninstallModule(\n uint256 moduleTypeId,\n address module,\n bytes calldata deInitData\n ) external payable onlyEntryPointOrSelf {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n _uninstallValidator(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n _uninstallExecutor(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n _uninstallFallbackHandler(module, deInitData);\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n _uninstallHook(module, deInitData);\n } else {\n revert UnsupportedModuleType(moduleTypeId);\n }\n emit ModuleUninstalled(moduleTypeId, module);\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function validateUserOp(\n PackedUserOperation calldata userOp,\n bytes32 userOpHash,\n uint256 missingAccountFunds\n )\n external\n payable\n virtual\n override\n onlyEntryPoint\n payPrefund(missingAccountFunds)\n returns (uint256 validSignature)\n {\n address validator;\n // @notice validator encoding in nonce is just an example!\n // @notice this is not part of the standard!\n // Account Vendors may choose any other way to implement validator selection\n uint256 nonce = userOp.nonce;\n assembly {\n validator := shr(96, nonce)\n }\n\n // check if validator is enabled. If not terminate the validation phase.\n if (!_isValidatorInstalled(validator)) return VALIDATION_FAILED;\n\n // bubble up the return value of the validator module\n validSignature = IValidator(validator).validateUserOp(\n userOp,\n userOpHash\n );\n }\n\n /**\n * @dev ERC-1271 isValidSignature\n * This function is intended to be used to validate a smart account signature\n * and may forward the call to a validator module\n *\n * @param hash The hash of the data that is signed\n * @param data The data that is signed\n */\n function isValidSignature(\n bytes32 hash,\n bytes calldata data\n ) external view virtual override returns (bytes4) {\n address validator = address(bytes20(data[0:20]));\n if (!_isValidatorInstalled(validator)) revert InvalidModule(validator);\n return\n IValidator(validator).isValidSignatureWithSender(\n msg.sender,\n hash,\n data[20:]\n );\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function isModuleInstalled(\n uint256 moduleTypeId,\n address module,\n bytes calldata additionalContext\n ) external view override returns (bool) {\n if (moduleTypeId == MODULE_TYPE_VALIDATOR) {\n return _isValidatorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {\n return _isExecutorInstalled(module);\n } else if (moduleTypeId == MODULE_TYPE_FALLBACK) {\n return\n _isFallbackHandlerInstalled(\n abi.decode(additionalContext, (bytes4)),\n module\n );\n } else if (moduleTypeId == MODULE_TYPE_HOOK) {\n return _isHookInstalled(module);\n } else {\n return false;\n }\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function accountId()\n external\n view\n virtual\n override\n returns (string memory)\n {\n return \"etherspotwallet.modular.v1.0.0\";\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsExecutionMode(\n ModeCode mode\n ) external view virtual override returns (bool isSupported) {\n (CallType callType, ExecType execType, , ) = mode.decode();\n if (callType == CALLTYPE_BATCH) isSupported = true;\n else if (callType == CALLTYPE_SINGLE) isSupported = true;\n else if (callType == CALLTYPE_DELEGATECALL)\n isSupported = true;\n // if callType is not single, batch or delegatecall return false\n else return false;\n\n if (execType == EXECTYPE_DEFAULT) isSupported = true;\n else if (execType == EXECTYPE_TRY)\n isSupported = true;\n // if execType is not default or try, return false\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function supportsModule(\n uint256 modulTypeId\n ) external view virtual override returns (bool) {\n if (modulTypeId == MODULE_TYPE_VALIDATOR) return true;\n else if (modulTypeId == MODULE_TYPE_EXECUTOR) return true;\n else if (modulTypeId == MODULE_TYPE_FALLBACK) return true;\n else if (modulTypeId == MODULE_TYPE_HOOK) return true;\n else return false;\n }\n\n /**\n * @dev see {IERC7579Account}.\n */\n function initializeAccount(\n bytes calldata data\n ) public payable virtual onlyProxy {\n _initModuleManager();\n (address owner, address bootstrap, bytes memory bootstrapCall) = abi\n .decode(data, (address, address, bytes));\n _addOwner(owner);\n (bool success, ) = bootstrap.delegatecall(bootstrapCall);\n if (!success) revert AccountInitializationFailed();\n }\n}\n" + }, + "src/modular-etherspot-wallet/wallet/ModularEtherspotWalletFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\nimport {LibClone} from \"solady/src/utils/LibClone.sol\";\nimport {IModularEtherspotWallet} from \"../interfaces/IModularEtherspotWallet.sol\";\n\ncontract ModularEtherspotWalletFactory {\n address public immutable implementation;\n\n constructor(address _implementation) {\n implementation = _implementation;\n }\n\n function createAccount(\n bytes32 salt,\n bytes calldata initCode\n ) public payable virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initCode);\n (bool alreadyDeployed, address account) = LibClone\n .createDeterministicERC1967(msg.value, implementation, _salt);\n\n if (!alreadyDeployed) {\n IModularEtherspotWallet(account).initializeAccount(initCode);\n }\n return account;\n }\n\n function getAddress(\n bytes32 salt,\n bytes calldata initcode\n ) public view virtual returns (address) {\n bytes32 _salt = _getSalt(salt, initcode);\n return\n LibClone.predictDeterministicAddressERC1967(\n implementation,\n _salt,\n address(this)\n );\n }\n\n function _getSalt(\n bytes32 _salt,\n bytes calldata initCode\n ) public pure virtual returns (bytes32 salt) {\n salt = keccak256(abi.encodePacked(_salt, initCode));\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "london", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "storageLayout", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/typings/factories/src/modular-etherspot-wallet/index.ts b/typings/factories/src/modular-etherspot-wallet/index.ts index 6ca60f6c..277d3f2e 100644 --- a/typings/factories/src/modular-etherspot-wallet/index.ts +++ b/typings/factories/src/modular-etherspot-wallet/index.ts @@ -3,6 +3,7 @@ /* eslint-disable */ export * as access from "./access"; export * as erc7579RefImpl from "./erc7579-ref-impl"; +export * as hooks from "./hooks"; export * as interfaces from "./interfaces"; export * as libraries from "./libraries"; export * as modules from "./modules"; diff --git a/typings/factories/src/modular-etherspot-wallet/modules/index.ts b/typings/factories/src/modular-etherspot-wallet/modules/index.ts index f02c8f7f..68b0259a 100644 --- a/typings/factories/src/modular-etherspot-wallet/modules/index.ts +++ b/typings/factories/src/modular-etherspot-wallet/modules/index.ts @@ -4,3 +4,4 @@ export * as executors from "./executors"; export * as hooks from "./hooks"; export * as validators from "./validators"; +export { MultipleOwnerECDSAValidator__factory } from "./MultipleOwnerECDSAValidator__factory"; diff --git a/typings/hardhat.d.ts b/typings/hardhat.d.ts index 8ee993d3..96f9941b 100644 --- a/typings/hardhat.d.ts +++ b/typings/hardhat.d.ts @@ -368,6 +368,10 @@ declare module "hardhat/types/runtime" { name: "Bootstrap", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "ModuleIsolationHook", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "IAccessController", signerOrOptions?: ethers.Signer | FactoryOptions @@ -392,6 +396,10 @@ declare module "hardhat/types/runtime" { name: "ModuleIsolationHook", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "MultipleOwnerECDSAValidator", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "ERC20SessionKeyValidator", signerOrOptions?: ethers.Signer | FactoryOptions @@ -858,6 +866,11 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "ModuleIsolationHook", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "IAccessController", address: string, @@ -888,6 +901,11 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "MultipleOwnerECDSAValidator", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "ERC20SessionKeyValidator", address: string, diff --git a/typings/index.ts b/typings/index.ts index d8e407f6..cc56f1d5 100644 --- a/typings/index.ts +++ b/typings/index.ts @@ -184,6 +184,8 @@ export type { MockValidator } from "./src/modular-etherspot-wallet/erc7579-ref-i export { MockValidator__factory } from "./factories/src/modular-etherspot-wallet/erc7579-ref-impl/test/mocks/MockValidator__factory"; export type { Bootstrap } from "./src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap"; export { Bootstrap__factory } from "./factories/src/modular-etherspot-wallet/erc7579-ref-impl/utils/Bootstrap__factory"; +export type { ModuleIsolationHook } from "./src/modular-etherspot-wallet/hooks/ModuleIsolationHook"; +export { ModuleIsolationHook__factory } from "./factories/src/modular-etherspot-wallet/hooks/ModuleIsolationHook__factory"; export type { IERC20SessionKeyValidator } from "./src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator"; export { IERC20SessionKeyValidator__factory } from "./factories/src/modular-etherspot-wallet/interfaces/IERC20SessionKeyValidator__factory"; export type { IModularEtherspotWallet } from "./src/modular-etherspot-wallet/interfaces/IModularEtherspotWallet"; @@ -192,12 +194,10 @@ export type { ErrorsLib } from "./src/modular-etherspot-wallet/libraries/ErrorsL export { ErrorsLib__factory } from "./factories/src/modular-etherspot-wallet/libraries/ErrorsLib__factory"; export type { ERC20Actions } from "./src/modular-etherspot-wallet/modules/executors/ERC20Actions"; export { ERC20Actions__factory } from "./factories/src/modular-etherspot-wallet/modules/executors/ERC20Actions__factory"; -export type { ModuleIsolationHook } from "./src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook"; -export { ModuleIsolationHook__factory } from "./factories/src/modular-etherspot-wallet/modules/hooks/ModuleIsolationHook__factory"; +export type { MultipleOwnerECDSAValidator } from "./src/modular-etherspot-wallet/modules/MultipleOwnerECDSAValidator"; +export { MultipleOwnerECDSAValidator__factory } from "./factories/src/modular-etherspot-wallet/modules/MultipleOwnerECDSAValidator__factory"; export type { ERC20SessionKeyValidator } from "./src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator"; export { ERC20SessionKeyValidator__factory } from "./factories/src/modular-etherspot-wallet/modules/validators/ERC20SessionKeyValidator__factory"; -export type { MultipleOwnerECDSAValidator } from "./src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator"; -export { MultipleOwnerECDSAValidator__factory } from "./factories/src/modular-etherspot-wallet/modules/validators/MultipleOwnerECDSAValidator__factory"; export type { TestERC20 } from "./src/modular-etherspot-wallet/test/TestERC20"; export { TestERC20__factory } from "./factories/src/modular-etherspot-wallet/test/TestERC20__factory"; export type { ModularEtherspotWallet } from "./src/modular-etherspot-wallet/wallet/ModularEtherspotWallet"; diff --git a/typings/src/modular-etherspot-wallet/index.ts b/typings/src/modular-etherspot-wallet/index.ts index 562edab9..5f6aee4b 100644 --- a/typings/src/modular-etherspot-wallet/index.ts +++ b/typings/src/modular-etherspot-wallet/index.ts @@ -5,6 +5,8 @@ import type * as access from "./access"; export type { access }; import type * as erc7579RefImpl from "./erc7579-ref-impl"; export type { erc7579RefImpl }; +import type * as hooks from "./hooks"; +export type { hooks }; import type * as interfaces from "./interfaces"; export type { interfaces }; import type * as libraries from "./libraries"; diff --git a/typings/src/modular-etherspot-wallet/modules/index.ts b/typings/src/modular-etherspot-wallet/modules/index.ts index 2bcbe2a8..2b8b3131 100644 --- a/typings/src/modular-etherspot-wallet/modules/index.ts +++ b/typings/src/modular-etherspot-wallet/modules/index.ts @@ -7,3 +7,4 @@ import type * as hooks from "./hooks"; export type { hooks }; import type * as validators from "./validators"; export type { validators }; +export type { MultipleOwnerECDSAValidator } from "./MultipleOwnerECDSAValidator";